public void onCommand(Object o) { Command command = (Command)o; if (command.isWireFormatInfo()) { WireFormatInfo info = (WireFormatInfo)command; negociate(info); } getTransportListener().onCommand(command); }
protected void processInboundConnection(Command command) { DatagramEndpoint endpoint = (DatagramEndpoint)command.getFrom(); if (LOG.isDebugEnabled()) { LOG.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command); } Transport transport = null; synchronized (transports) { transport = transports.get(endpoint); if (transport == null) { if (usingWireFormatNegotiation && !command.isWireFormatInfo()) { LOG.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command); } else { if (LOG.isDebugEnabled()) { LOG.debug("Creating a new UDP server connection"); } try { transport = createTransport(command, endpoint); transport = configureTransport(transport); transports.put(endpoint, transport); } catch (IOException e) { LOG.error("Caught: " + e, e); getAcceptListener().onAcceptError(e); } } } else { LOG.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command); } } }
Command command = (Command)o; if (command.isWireFormatInfo()) { super.onCommand(command); return;
public void onCommand(Object o) { Command command = (Command)o; if (command.isWireFormatInfo()) { WireFormatInfo info = (WireFormatInfo)command; negociate(info); } getTransportListener().onCommand(command); }
protected void processInboundConnection(Command command) { DatagramEndpoint endpoint = (DatagramEndpoint)command.getFrom(); if (LOG.isDebugEnabled()) { LOG.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command); } Transport transport = null; synchronized (transports) { transport = transports.get(endpoint); if (transport == null) { if (usingWireFormatNegotiation && !command.isWireFormatInfo()) { LOG.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command); } else { if (LOG.isDebugEnabled()) { LOG.debug("Creating a new UDP server connection"); } try { transport = createTransport(command, endpoint); transport = configureTransport(transport); transports.put(endpoint, transport); } catch (IOException e) { LOG.error("Caught: " + e, e); getAcceptListener().onAcceptError(e); } } } else { LOG.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command); } } }
public void onCommand(Object o) { Command command = (Command)o; if (command.isWireFormatInfo()) { WireFormatInfo info = (WireFormatInfo)command; negociate(info); } getTransportListener().onCommand(command); }
public void onCommand(Object o) { Command command = (Command)o; if (command.isWireFormatInfo()) { WireFormatInfo info = (WireFormatInfo)command; negociate(info); } getTransportListener().onCommand(command); }
protected void processInboundConnection(Command command) { DatagramEndpoint endpoint = (DatagramEndpoint)command.getFrom(); if (LOG.isDebugEnabled()) { LOG.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command); } Transport transport = null; synchronized (transports) { transport = transports.get(endpoint); if (transport == null) { if (usingWireFormatNegotiation && !command.isWireFormatInfo()) { LOG.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command); } else { if (LOG.isDebugEnabled()) { LOG.debug("Creating a new UDP server connection"); } try { transport = createTransport(command, endpoint); transport = configureTransport(transport); transports.put(endpoint, transport); } catch (IOException e) { LOG.error("Caught: " + e, e); getAcceptListener().onAcceptError(e); } } } else { LOG.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command); } } }
public void onCommand(Object o) { Command command = (Command)o; if (command.isWireFormatInfo()) { WireFormatInfo info = (WireFormatInfo)command; negociate(info); } getTransportListener().onCommand(command); }
protected void processInboundConnection(Command command) { DatagramEndpoint endpoint = (DatagramEndpoint)command.getFrom(); if (LOG.isDebugEnabled()) { LOG.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command); } Transport transport = null; synchronized (transports) { transport = transports.get(endpoint); if (transport == null) { if (usingWireFormatNegotiation && !command.isWireFormatInfo()) { LOG.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command); } else { if (LOG.isDebugEnabled()) { LOG.debug("Creating a new UDP server connection"); } try { transport = createTransport(command, endpoint); transport = configureTransport(transport); transports.put(endpoint, transport); } catch (IOException e) { LOG.error("Caught: " + e, e); getAcceptListener().onAcceptError(e); } } } else { LOG.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command); } } }
protected void processInboundConnection(Command command) { DatagramEndpoint endpoint = (DatagramEndpoint)command.getFrom(); if (LOG.isDebugEnabled()) { LOG.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command); } Transport transport = null; synchronized (transports) { transport = transports.get(endpoint); if (transport == null) { if (usingWireFormatNegotiation && !command.isWireFormatInfo()) { LOG.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command); } else { if (LOG.isDebugEnabled()) { LOG.debug("Creating a new UDP server connection"); } try { transport = createTransport(command, endpoint); transport = configureTransport(transport); transports.put(endpoint, transport); } catch (IOException e) { LOG.error("Caught: " + e, e); getAcceptListener().onAcceptError(e); } } } else { LOG.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command); } } }
protected void processCommand(Object o) throws Exception { Command command = (Command) o; if (command.isResponse()) { LOG.error("Unexpected response " + command); } else if (command.isMessageDispatch()) { MessageDispatch messageDispatch = (MessageDispatch) command; ConsumerId consumerId = messageDispatch.getConsumerId(); MultiplexerInput input = consumerIdMultiplexerInputMap.get(consumerId); if (input != null) { input.oneway(messageDispatch); } else { LOG.debug("Couldn't find MultiplexerInput for consumerId:" + consumerId); } } else if (command.isBrokerInfo() || command.isWireFormatInfo()) { //not a lot to do with this } else if (command.getClass() == ConnectionError.class) { ConnectionError ce = (ConnectionError) command; onFailure(ce.getException()); } else { switch (command.getDataStructureType()) { case KeepAliveInfo.DATA_STRUCTURE_TYPE: case ShutdownInfo.DATA_STRUCTURE_TYPE: case ConnectionControl.DATA_STRUCTURE_TYPE: break; default: LOG.warn("Unexpected remote command: {}", command); } } }
Command command = (Command)o; if (command.isWireFormatInfo()) { super.onCommand(command); return;
protected void processCommand(Object o) throws Exception { Command command = (Command) o; if (command.isResponse()) { LOG.error("Unexpected response " + command); } else if (command.isMessageDispatch()) { MessageDispatch messageDispatch = (MessageDispatch) command; ConsumerId consumerId = messageDispatch.getConsumerId(); MultiplexerInput input = consumerIdMultiplexerInputMap.get(consumerId); if (input != null) { input.oneway(messageDispatch); } else { LOG.debug("Couldn't find MultiplexerInput for consumerId:" + consumerId); } } else if (command.isBrokerInfo() || command.isWireFormatInfo()) { //not a lot to do with this } else if (command.getClass() == ConnectionError.class) { ConnectionError ce = (ConnectionError) command; onFailure(ce.getException()); } else { switch (command.getDataStructureType()) { case KeepAliveInfo.DATA_STRUCTURE_TYPE: case ShutdownInfo.DATA_STRUCTURE_TYPE: case ConnectionControl.DATA_STRUCTURE_TYPE: break; default: LOG.warn("Unexpected remote command: {}", command); } } }
Command command = (Command)o; if (command.isWireFormatInfo()) { super.onCommand(command); return;
public void onCommand(Object o) { Command command = (Command)o; if (command.isWireFormatInfo()) { super.onCommand(command); return;
Command command = (Command)o; if (command.isWireFormatInfo()) { super.onCommand(command); return;
public void doConsume(Object o) { inactivityMonitor.startRead(); Command command = (Command) o; if (command.isWireFormatInfo()) { WireFormatInfo info = (WireFormatInfo) command; negotiate(info); } if (command.getDataStructureType() == KeepAliveInfo.DATA_STRUCTURE_TYPE) { KeepAliveInfo keepAliveInfo = (KeepAliveInfo) command; inactivityMonitor.processKeepAliveReceived(keepAliveInfo); } else { super.doConsume(command); } inactivityMonitor.finishedRead(); }
public void doConsume(Object o) { inactivityMonitor.startRead(); Command command = (Command) o; if (command.isWireFormatInfo()) { WireFormatInfo info = (WireFormatInfo) command; negotiate(info); } if (command.getDataStructureType() == KeepAliveInfo.DATA_STRUCTURE_TYPE) { KeepAliveInfo keepAliveInfo = (KeepAliveInfo) command; inactivityMonitor.processKeepAliveReceived(keepAliveInfo); } else { super.doConsume(command); } inactivityMonitor.finishedRead(); }