Methods Summary |
---|
protected java.lang.String | extractFaultCode(java.lang.String completeFaultCode)
StringTokenizer tokenizer = new StringTokenizer(completeFaultCode, ":");
if(tokenizer.countTokens() > 1) tokenizer.nextToken();
return tokenizer.nextToken();
|
public javax.jbi.messaging.NormalizedMessage | getMessage()
return msg;
|
public javax.jbi.messaging.MessageExchange | getMessageExchange()
return me;
|
protected void | invokeHandlersForInbound()
for (JBIHandler handler : JBIHandlerFactory.getInstance().getHandlers())
try {
handler.handleInbound(this);
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
throw new ServiceEngineException(e);
}
|
protected void | invokeHandlersForOutbound()
for (JBIHandler handler : JBIHandlerFactory.getInstance().getHandlers())
try {
handler.handleOutbound(this);
} catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
// throw new ServiceEngineException(e);
}
|
protected void | preReceive()
invokeHandlersForOutbound();
|
protected void | preSend()
invokeHandlersForInbound();
|
public java.lang.Exception | receiveError()
preReceive();
return me.getError();
|
protected void | send()
preSend();
MessageSender messageSender = new MessageSender();
messageSender.setMessageExchange(me);
messageSender.send();
Exception exception = messageSender.getException();
if(exception != null)
throw exception;
|
public void | sendError(java.lang.Exception exception)
try {
logger.log(Level.SEVERE,
"Sending error to the consumer - " + exception);
if(exception != null) {
me.setError(exception);
}
me.setStatus(ExchangeStatus.ERROR);
send();
} catch(Exception ex) {
// Can't do much here.
logger.log(Level.SEVERE, ex.getMessage(), ex);
}
|
public void | sendStatus(javax.jbi.messaging.ExchangeStatus status)
try {
me.setStatus(status);
MessageSender messageSender = new MessageSender();
messageSender.setMessageExchange(me);
messageSender.send();
} catch(Exception ex) {
// Can't do much here.
logger.log(Level.SEVERE, ex.getMessage(), ex);
}
|