use of org.jboss.narayana.blacktie.jatmibroker.core.transport.hybrid.stomp.StompReceiverImpl in project narayana by jbosstm.
the class TransportImpl method getReceiver.
public Receiver getReceiver(String serviceName, boolean conversational) throws ConnectionException {
if (closed) {
log.error("Already closed");
throw new ConnectionException(Connection.TPEPROTO, "Already closed");
}
log.debug("Creating a receiver: " + serviceName);
Map<String, Receiver> conversationalMap = receivers.get(conversational);
if (conversationalMap == null) {
conversationalMap = new HashMap<String, Receiver>();
receivers.put(conversational, conversationalMap);
}
Receiver toReturn = conversationalMap.get(serviceName);
if (toReturn == null) {
try {
log.debug("Resolved destination");
String type = (String) properties.get("blacktie." + serviceName + ".type");
return new StompReceiverImpl(serviceName, conversational, type, properties);
} catch (ConnectionException e) {
throw e;
} catch (Throwable t) {
throw new ConnectionException(org.jboss.narayana.blacktie.jatmibroker.xatmi.Connection.TPESYSTEM, "Could not create the receiver on: " + serviceName, t);
}
}
return toReturn;
}
Aggregations