private static final String SUCCESS_MESSAGE = "Success";
- private Logger fLog = LoggerFactory.getLogger ( this.getClass().getName () );
+ private Logger log = LoggerFactory.getLogger ( this.getClass().getName () );
public static List<String> stringToList ( String str )
{
final LinkedList<String> set = new LinkedList<String> ();
{
// unexpected response
reportProblemWithResponse ();
+ log.error("exception: ", e);
}
catch ( HttpException e )
{
{
// unexpected response
reportProblemWithResponse ();
+ log.error("exception: ", e);
}
catch ( HttpException e )
{
{
// unexpected response
reportProblemWithResponse ();
+ log.error("exception: ", e);
}
catch ( HttpException e )
{
} catch ( JSONException e ) {
// unexpected response
reportProblemWithResponse ();
+ log.error("exception: ", e);
} catch (HttpException e) {
throw new IOException(e);
} catch (Exception e ) {
try {
- //fLog.info("DMAAP response status: " + response.getStatus());
+ //log.info("DMAAP response status: " + response.getStatus());
// final String responseData = response.readEntity(String.class);
JSONTokener jsonTokener = new JSONTokener(response);
return jsonObject;
} catch (JSONException excp) {
- // fLog.error("DMAAP - Error reading response data.", excp);
+ // log.error("DMAAP - Error reading response data.", excp);
return null;
}
private Properties props;
private HashMap<String, String> DMETimeOuts;
private String handlers;
- public static String routerFilePath;
+ public static final String routerFilePath = null;
public static String getRouterFilePath() {
return routerFilePath;
}
url = protocol + "://"+serviceName+"?version="+version+"&envContext="+env+"&routeoffer="+routeOffer;
}
- //fLog.info("url :"+url);
+ //log.info("url :"+url);
if(timeoutMs != -1 )url=url+"&timeout="+timeoutMs;
if(limit != -1 )url=url+"&limit="+limit;
MRClientFactory.prop.load(new FileReader(new File (MRClientFactory.routeFilePath)));
} catch (Exception ex) {
- fLog.error("Reply Router Error " + ex.toString() );
+ log.error("Reply Router Error " + ex.toString() );
}
String routeOffer = MRClientFactory.prop.getProperty(routeKey);
return routeOffer;
} catch (JSONException e) {
mrConsumerResponse.setResponseMessage(String.valueOf(HttpStatus.SC_INTERNAL_SERVER_ERROR));
mrConsumerResponse.setResponseMessage(e.getMessage());
+ log.error("json exception: ", e);
} catch (HttpException e) {
mrConsumerResponse.setResponseMessage(String.valueOf(HttpStatus.SC_INTERNAL_SERVER_ERROR));
mrConsumerResponse.setResponseMessage(e.getMessage());
+ log.error("http exception: ", e);
}catch(DME2Exception e){
mrConsumerResponse.setResponseCode(e.getErrorCode());
mrConsumerResponse.setResponseMessage(e.getErrorMessage());
+ log.error("DME2 exception: ", e);
}catch (Exception e) {
mrConsumerResponse.setResponseMessage(String.valueOf(HttpStatus.SC_INTERNAL_SERVER_ERROR));
mrConsumerResponse.setResponseMessage(e.getMessage());
+ log.error("exception: ", e);
}
mrConsumerResponse.setActualMessages(msgs);
return mrConsumerResponse;