}
public void addAgentXTransportMapping(TransportMapping transport) {
agentX.getMessageDispatcher().addTransportMapping(transport);
if (transport instanceof ConnectionOrientedTransportMapping) {
ConnectionOrientedTransportMapping cotm =
(ConnectionOrientedTransportMapping)transport;
cotm.addTransportStateListener(this);
cotm.setConnectionTimeout(0);
cotm.setMessageLengthDecoder(new AgentXProtocol());
}
}