MessageExchangeTransport handler;
if(me instanceof InOut) {
handler =
me.getRole().equals(MessageExchange.Role.PROVIDER)
? new ProviderInOut((InOut)me)
: new ConsumerInOut((InOut)me);
} else if (me instanceof InOnly) {
handler =
me.getRole().equals(MessageExchange.Role.PROVIDER)
? new ProviderInOnly((InOnly)me)
: new ConsumerInOnly((InOnly)me);
} else { // Currently we don't support for other types of MEP.
handler = null;
}
if(logger.isLoggable(Level.FINE)) {
logger.log(Level.FINE, "Handler = " + handler);
}
return handler;