--- /dev/null
+/*******************************************************************************
+ * ============LICENSE_START==================================================
+ * * org.onap.dmaap
+ * * ===========================================================================
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * * ===========================================================================
+ * * Licensed under the Apache License, Version 2.0 (the "License");
+ * * you may not use this file except in compliance with the License.
+ * * You may obtain a copy of the License at
+ * *
+ * * http://www.apache.org/licenses/LICENSE-2.0
+ * *
+ * * Unless required by applicable law or agreed to in writing, software
+ * * distributed under the License is distributed on an "AS IS" BASIS,
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * * See the License for the specific language governing permissions and
+ * * limitations under the License.
+ * * ============LICENSE_END====================================================
+ * *
+ * * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * *
+ ******************************************************************************/
\ No newline at end of file
+++ /dev/null
-
- ============LICENSE_START=======================================================
- org.onap.dmaap
- ================================================================================
- Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
-
- ECOMP is a trademark and service mark of AT&T Intellectual Property.
\ No newline at end of file
<version>1.0.0-SNAPSHOT</version>
<name>dmaapClient</name>
<description>Client library for MR event routing API</description>
-
+ <url>https://github.com/att/dmaap-framework</url>
+
<parent>
<groupId>org.onap.oparent</groupId>
<artifactId>oparent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
-
<properties>
<!-- for the client library, we want to allow 1.6 or later -->
<maven.compiler.target>1.7</maven.compiler.target>
</developer>
</developers>
- <!-- End Distribution management -->
-
<dependencies>
<dependency>
<groupId>com.att.nsa</groupId>
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import java.util.Collection;
import java.util.Iterator;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
-
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRPublisherResponse;
+import com.att.nsa.mr.client.response.MRPublisherResponse;
/**
* A MR batching publisher is a publisher with additional functionality
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import org.slf4j.Logger;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import java.net.MalformedURLException;
import java.util.Collection;
import java.util.TreeSet;
import java.util.UUID;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRConsumerImpl;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRMetaClient;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRSimplerBatchPublisher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.att.nsa.mr.client.impl.MRConsumerImpl;
+import com.att.nsa.mr.client.impl.MRMetaClient;
+import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher;
+
/**
* A collection of builders for various types of MR API clients
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import java.io.File;
import java.io.FileNotFoundException;
import javax.ws.rs.core.MultivaluedMap;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRConsumerImpl;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRMetaClient;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRSimplerBatchPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients.ProtocolTypeConstants;
+import com.att.nsa.mr.client.impl.MRConsumerImpl;
+import com.att.nsa.mr.client.impl.MRMetaClient;
+import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher;
+import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
/**
* A factory for MR clients.<br/>
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import java.io.IOException;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRConsumerResponse;
+import com.att.nsa.mr.client.response.MRConsumerResponse;
public interface MRConsumer extends MRClient
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import java.io.IOException;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import java.io.IOException;
import java.util.Collection;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client;
+package com.att.nsa.mr.client;
import java.io.IOException;
import java.util.Set;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
public class Clock
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.net.MalformedURLException;
import java.util.Collection;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClient;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients.ProtocolTypeConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.att.nsa.apiClient.http.CacheUse;
import com.att.nsa.apiClient.http.HttpClient;
+import com.att.nsa.mr.client.MRClient;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
+//import com.fasterxml.jackson.core.JsonProcessingException;
public class MRBaseClient extends HttpClient implements MRClient
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
import java.util.zip.GZIPOutputStream;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRPublisherResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.att.nsa.apiClient.http.HttpClient;
import com.att.nsa.apiClient.http.HttpException;
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.response.MRPublisherResponse;
/**
* This is a batching publisher class that allows the client to publish messages
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.io.IOException;
import java.io.InputStream;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.io.File;
import java.io.FileReader;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRConsumer;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRConsumerResponse;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients.ProtocolTypeConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.att.aft.dme2.api.DME2Client;
import com.att.aft.dme2.api.DME2Exception;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRConsumer;
+import com.att.nsa.mr.client.response.MRConsumerResponse;
+import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
public class MRConsumerImpl extends MRBaseClient implements MRConsumer
{
sender.addHeader("AFT_DME2_EXCHANGE_REPLY_HANDLERS", props.getProperty("AFT_DME2_EXCHANGE_REPLY_HANDLERS"));
sender.addHeader("AFT_DME2_REQ_TRACE_ON", props.getProperty("AFT_DME2_REQ_TRACE_ON"));
}else{
- sender.addHeader("AFT_DME2_EXCHANGE_REPLY_HANDLERS", "org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.dme.client.HeaderReplyHandler");
+ sender.addHeader("AFT_DME2_EXCHANGE_REPLY_HANDLERS", "com.att.nsa.mr.dme.client.HeaderReplyHandler");
}
/* HeaderReplyHandler headerhandler= new HeaderReplyHandler();
sender.setReplyHandler(headerhandler);*/
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
enum MRFormat
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.io.IOException;
import java.net.MalformedURLException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRIdentityManager;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRTopicManager;
import com.att.nsa.apiClient.credentials.ApiCredential;
import com.att.nsa.apiClient.http.HttpException;
import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
+import com.att.nsa.mr.client.MRIdentityManager;
+import com.att.nsa.mr.client.MRTopicManager;
public class MRMetaClient extends MRBaseClient implements MRTopicManager, MRIdentityManager
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import org.apache.http.HttpStatus;
import org.json.JSONArray;
import org.json.JSONObject;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.HostSelector;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRPublisherResponse;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients.ProtocolTypeConstants;
import com.att.aft.dme2.api.DME2Client;
import com.att.aft.dme2.api.DME2Exception;
+import com.att.nsa.mr.client.HostSelector;
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.response.MRPublisherResponse;
+import com.att.nsa.mr.test.clients.ProtocolTypeConstants;
public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingPublisher
{
sender.addHeader("AFT_DME2_EXCHANGE_REPLY_HANDLERS", props.getProperty("AFT_DME2_EXCHANGE_REPLY_HANDLERS"));
sender.addHeader("AFT_DME2_REQ_TRACE_ON", props.getProperty("AFT_DME2_REQ_TRACE_ON"));
}else{
- sender.addHeader("AFT_DME2_EXCHANGE_REPLY_HANDLERS", "org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.dme.client.HeaderReplyHandler");
+ sender.addHeader("AFT_DME2_EXCHANGE_REPLY_HANDLERS", "com.att.nsa.mr.dme.client.HeaderReplyHandler");
}
} catch (DME2Exception x) {
getLog().warn(x.getMessage(), x);
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response;
+package com.att.nsa.mr.client.response;
public class MRConsumerResponse {
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response;
+package com.att.nsa.mr.client.response;
/**
* Response for Publisher
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.dme.client;
+package com.att.nsa.mr.dme.client;
//package com.att.aft.dme2.api;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.dme.client;
+package com.att.nsa.mr.dme.client;
import java.util.Map;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRSimplerBatchPublisher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.att.aft.dme2.api.util.DME2ExchangeFaultContext;
import com.att.aft.dme2.api.util.DME2ExchangeReplyHandler;
import com.att.aft.dme2.api.util.DME2ExchangeResponseContext;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.dme.client;
+package com.att.nsa.mr.dme.client;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStream;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRSimplerBatchPublisher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.att.aft.dme2.api.util.DME2ExchangeFaultContext;
import com.att.aft.dme2.api.util.DME2ExchangeReplyHandler;
import com.att.aft.dme2.api.util.DME2ExchangeResponseContext;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.impl.MRSimplerBatchPublisher;
public class PreferredRouteReplyHandler implements DME2ExchangeReplyHandler {
private Logger fLog = LoggerFactory.getLogger ( this.getClass().getName () );
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.dme.client;
+package com.att.nsa.mr.dme.client;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.att.aft.dme2.api.util.DME2ExchangeRequestContext;
import com.att.aft.dme2.api.util.DME2ExchangeRequestHandler;
+import com.att.nsa.mr.client.MRClientFactory;
public class PreferredRouteRequestHandler implements DME2ExchangeRequestHandler {
private Logger fLog = LoggerFactory.getLogger(this.getClass().getName());
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.dme.client;
+package com.att.nsa.mr.dme.client;
import java.util.Map;
import javax.ws.rs.core.MultivaluedMap;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRConsumer;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRConsumer;
public class SimpleExampleConsumer {
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.dme.client;
+package com.att.nsa.mr.dme.client;
import java.io.IOException;
import javax.ws.rs.core.MultivaluedMap;
import org.json.JSONObject;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRPublisher.message;
+
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRPublisher.message;
/**
* An example of how to use the Java publisher.
/**
*
*/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.logging;
+package com.att.nsa.mr.logging;
import java.io.IOException;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.helpers.LogLog;
import org.apache.log4j.spi.LoggingEvent;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRPublisher;
+
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRPublisher;
/**
* @author author
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients;
+package com.att.nsa.mr.test.clients;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRPublisher.message;
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRPublisher.message;
/**
* A simple publisher that reads from std in, sending each line as a message.
/**
*
*/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients;
+package com.att.nsa.mr.test.clients;
/**
* @author author
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients;
+package com.att.nsa.mr.test.clients;
import java.io.IOException;
import java.util.LinkedList;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRConsumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRConsumer;
+
public class SampleConsumer {
public static void main ( String[] args )
{
LOG.info("Sample Consumer Class executing");
- final String topic = "org.onap.dmaap.messagerouter.dmaapclient.app.dmaap.mr.testingTopic";
+ final String topic = "com.att.app.dmaap.mr.testingTopic";
final String url = ( args.length > 1 ? args[1] : "localhost:8181" );
final String group = ( args.length > 2 ? args[2] :"grp" );
/*final String id = ( args.length > 3 ? args[3] : "0" );*/
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients;
+package com.att.nsa.mr.test.clients;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientBuilders.PublisherBuilder;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRPublisher.message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRClientBuilders.PublisherBuilder;
+import com.att.nsa.mr.client.MRPublisher.message;
+
public class SamplePublisher {
public static void main ( String[] args ) throws IOException, InterruptedException
{
// read the topic name from the command line
//final String topic = ( args.length > 1 ? args[1] : "MY-EXAMPLE-TOPIC" );
- final String topic = ( args.length > 1 ? args[1] : "org.onap.dmaap.messagerouter.dmaapclient.app.dmaap.mr.testingTopic" );
+ final String topic = ( args.length > 1 ? args[1] : "com.att.app.dmaap.mr.testingTopic" );
// set up some batch limits and the compression flag
final int maxBatchSize = 100;
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients;
+package com.att.nsa.mr.test.clients;
import java.io.FileWriter;
import java.util.Properties;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRConsumer;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRConsumer;
public class SimpleExampleConsumer
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients;
+package com.att.nsa.mr.test.clients;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Properties;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRConsumer;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRConsumerResponse;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRConsumer;
+import com.att.nsa.mr.client.response.MRConsumerResponse;
public class SimpleExampleConsumerWithReturnResponse {
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients;
+package com.att.nsa.mr.test.clients;
import java.io.File;
import java.io.FileReader;
import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRPublisher.message;
+
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRPublisher.message;
/**
* An example of how to use the Java publisher.
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.clients;
+package com.att.nsa.mr.test.clients;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRPublisherResponse;
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.response.MRPublisherResponse;
/**
*An example of how to use the Java publisher.
* @author author
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.support;
+package com.att.nsa.mr.test.support;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRPublisherResponse;
import org.slf4j.Logger;
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.response.MRPublisherResponse;
+
/**
* A helper for unit testing systems that use a MRPublisher. When setting
* up your test, inject an instance into MRClientFactory to have it return
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.test.support;
+package com.att.nsa.mr.test.support;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRConsumer;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.response.MRConsumerResponse;
import org.slf4j.Logger;
+import com.att.nsa.mr.client.MRConsumer;
+import com.att.nsa.mr.client.response.MRConsumerResponse;
+
/**
* A helper for unit testing systems that use a MRConsumer. When setting
* up your test, inject an instance into MRClientFactory to have it return
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools;
+package com.att.nsa.mr.tools;
import java.io.IOException;
import java.io.PrintStream;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRIdentityManager;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClient.MRApiException;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRIdentityManager.ApiKey;
-
import com.att.nsa.apiClient.credentials.ApiCredential;
import com.att.nsa.apiClient.http.HttpException;
import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
import com.att.nsa.cmdtool.Command;
import com.att.nsa.cmdtool.CommandNotReadyException;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRIdentityManager;
+import com.att.nsa.mr.client.MRClient.MRApiException;
+import com.att.nsa.mr.client.MRIdentityManager.ApiKey;
public class ApiKeyCommand implements Command<MRCommandContext>
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools;
+package com.att.nsa.mr.tools;
import java.io.PrintStream;
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools;
+package com.att.nsa.mr.tools;
import java.io.PrintStream;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRConsumerImpl;
-
import com.att.nsa.cmdtool.Command;
import com.att.nsa.cmdtool.CommandNotReadyException;
+import com.att.nsa.mr.client.impl.MRConsumerImpl;
public class ClusterCommand implements Command<MRCommandContext>
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools;
+package com.att.nsa.mr.tools;
import java.util.Collection;
import java.util.LinkedList;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClient;
-
import com.att.nsa.apiClient.http.HttpClient;
import com.att.nsa.apiClient.http.HttpTracer;
import com.att.nsa.cmdtool.CommandContext;
+import com.att.nsa.mr.client.MRClient;
public class MRCommandContext implements CommandContext
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools;
+package com.att.nsa.mr.tools;
import java.io.IOException;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRClientVersionInfo;
-
import com.att.nsa.cmdtool.CommandLineTool;
+import com.att.nsa.mr.client.impl.MRClientVersionInfo;
public class MRTool extends CommandLineTool<MRCommandContext>
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools;
+package com.att.nsa.mr.tools;
import java.io.IOException;
import java.io.PrintStream;
import java.util.List;
import java.util.concurrent.TimeUnit;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRBatchingPublisher;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRConsumer;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientBuilders.PublisherBuilder;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRPublisher.message;
-
import com.att.nsa.cmdtool.Command;
import com.att.nsa.cmdtool.CommandNotReadyException;
+import com.att.nsa.mr.client.MRBatchingPublisher;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRConsumer;
+import com.att.nsa.mr.client.MRClientBuilders.PublisherBuilder;
+import com.att.nsa.mr.client.MRPublisher.message;
public class MessageCommand implements Command<MRCommandContext>
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools;
+package com.att.nsa.mr.tools;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Set;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRClientFactory;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRTopicManager;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.MRTopicManager.TopicInfo;
-
import com.att.nsa.apiClient.http.HttpException;
import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
import com.att.nsa.cmdtool.Command;
import com.att.nsa.cmdtool.CommandNotReadyException;
+import com.att.nsa.mr.client.MRClientFactory;
+import com.att.nsa.mr.client.MRTopicManager;
+import com.att.nsa.mr.client.MRTopicManager.TopicInfo;
public class TopicCommand implements Command<MRCommandContext>
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools;
+package com.att.nsa.mr.tools;
import java.io.PrintStream;
import java.net.URI;
authDate=2016-02-18T13:57:37-0800
#host=uebsb91bodc.it.att.com:3904
host=<host>:<port>
-topic=org.onap.dmaap.messagerouter.dmaapclient.ecomp_test.crm.preDemo1
+topic=com.att.ecomp_test.crm.preDemo1
group=con
id=5
timeout=15000
limit=1000
filter=
-AFT_DME2_EXCHANGE_REQUEST_HANDLERS=org.onap.dmaap.messagerouter.dmaapclient.nsa.test.PreferredRouteRequestHandler
-AFT_DME2_EXCHANGE_REPLY_HANDLERS=org.onap.dmaap.messagerouter.dmaapclient.nsa.test.PreferredRouteReplyHandler
+AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler
+AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler
AFT_DME2_REQ_TRACE_ON=true
AFT_ENVIRONMENT=AFTUAT
AFT_DME2_EP_CONN_TIMEOUT=15000
authKey=<auth key>
authDate=2016-07-20T11:30:56-0700
host=<host>:<port>
-topic=org.onap.dmaap.messagerouter.dmaapclient.ecomp_test.crm.preDemo1
+topic=com.att.ecomp_test.crm.preDemo1
#host=uebsb91bodc.it.att.com:3904
partition=1
maxBatchSize=100
maxAgeMs=250
-AFT_DME2_EXCHANGE_REQUEST_HANDLERS=org.onap.dmaap.messagerouter.dmaapclient.nsa.test.PreferredRouteRequestHandler
-AFT_DME2_EXCHANGE_REPLY_HANDLERS=org.onap.dmaap.messagerouter.dmaapclient.nsa.test.PreferredRouteReplyHandler
+AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler
+AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler
AFT_DME2_REQ_TRACE_ON=true
AFT_ENVIRONMENT=AFTUAT
AFT_DME2_EP_CONN_TIMEOUT=15000
</layout>
</appender>-->
+
+
<logger name="com.att" additivity="false">
<level value="INFO" />
<appender-ref ref="CONSOLE" />
</logger>
- <logger name="org.onap.dmaap.messagerouter.dmaapclient" additivity="false">
- <level value="INFO" />
- <appender-ref ref="CONSOLE" />
- </logger>
<!-- ############################ -->
<!-- ROOT -->
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.io.IOException;
import java.util.ArrayList;
import org.apache.http.HttpHost;
import org.junit.Test;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRConstants;
+
+import com.att.nsa.mr.client.impl.MRConstants;
public class MRConstantsTest extends TestCase
{
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
-package org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl;
+package com.att.nsa.mr.client.impl;
import java.io.IOException;
import java.util.LinkedList;
import junit.framework.TestCase;
import org.junit.Test;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRConstants;
-import org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.client.impl.MRConsumerImpl;
+
+import com.att.nsa.mr.client.impl.MRConstants;
+import com.att.nsa.mr.client.impl.MRConsumerImpl;
public class MRConsumerImplTest extends TestCase
{
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
- <appender name="MR" class="org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.logging.MRAppender">
+ <appender name="MR" class="com.att.nsa.mr.logging.MRAppender">
<param name="Topic" value="Log4J_Topic"/>
<param name="Partition" value="1"/>
<param name="Hosts" value="zlxv8619.vci.att.com"/>
-java -Djline=false -cp ./target/dmaapClient-0.2.1-SNAPSHOT-jar-with-dependencies.jar org.onap.dmaap.messagerouter.dmaapclient.nsa.mr.tools.MRTool
+java -Djline=false -cp ./target/dmaapClient-0.2.1-SNAPSHOT-jar-with-dependencies.jar com.att.nsa.mr.tools.MRTool
cluster uebsb91sfdc.it.att.com
cluster uebsb91sfdc.it.att.com,uebsb92sfdc.it.att.com,uebsb93sfdc.it.att.com