public void serviceLocalException(Throwable error) { LOG.info("Unexpected local exception: {}", error.getMessage()); LOG.debug("Exception trace: ", error); fireBridgeFailed(); }
public void onCommand(Object o) { Command command = (Command)o; serviceLocalCommand(command); }
protected void serviceRemoteCommand(Command command) { try { if (command.isBrokerInfo()) { synchronized (this) { remoteBrokerInfo = (BrokerInfo)command; remoteBrokerId = remoteBrokerInfo.getBrokerId(); if (localBrokerId != null) { if (localBrokerId.equals(remoteBrokerId)) { LOG.info("Disconnecting loop back connection."); ServiceSupport.dispose(this); } else { triggerStartBridge(); } } } } else { LOG.warn("Unexpected remote command: {}", command); } } catch (IOException e) { serviceLocalException(e); } }
if (isUseCompression()) { message.compress(); ServiceSupport.dispose(this); } else { triggerStartBridge(); serviceLocalException(e);
public void onException(IOException error) { serviceLocalException(error); } });
public void run() { try { startBridge(); } catch (IOException e) { LOG.error("Failed to start network bridge: ", e); } } };
public void onCommand(Object o) { Command command = (Command)o; serviceRemoteCommand(command); }
public void onException(IOException error) { serviceRemoteException(error); } });
if (isUseCompression()) { message.compress(); ServiceSupport.dispose(this); } else { triggerStartBridge(); serviceLocalException(e);
public void onCompletion(FutureResponse future) { try { Response response = future.getResult(); if (response.isException()) { ExceptionResponse er = (ExceptionResponse)response; serviceLocalException(er.getException()); } else { dequeueCounter.incrementAndGet(); localBroker.oneway(new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1)); } } catch (IOException e) { serviceLocalException(e); } } };
public void run() { try { startBridge(); } catch (IOException e) { LOG.error("Failed to start network bridge: ", e); } } };
public void onCommand(Object o) { Command command = (Command)o; serviceRemoteCommand(command); }
public void onException(IOException error) { serviceRemoteException(error); } });
if (isUseCompression()) { message.compress(); ServiceSupport.dispose(this); } else { triggerStartBridge(); serviceLocalException(e);
protected void serviceRemoteCommand(Command command) { try { if (command.isBrokerInfo()) { synchronized (this) { remoteBrokerInfo = (BrokerInfo)command; remoteBrokerId = remoteBrokerInfo.getBrokerId(); if (localBrokerId != null) { if (localBrokerId.equals(remoteBrokerId)) { LOG.info("Disconnecting loop back connection."); ServiceSupport.dispose(this); } else { triggerStartBridge(); } } } } else { LOG.warn("Unexpected remote command: {}", command); } } catch (IOException e) { serviceLocalException(e); } }
public void onException(IOException error) { serviceLocalException(error); } });
public void run() { try { startBridge(); } catch (IOException e) { LOG.error("Failed to start network bridge: ", e); } } };
public void serviceLocalException(Throwable error) { LOG.info("Unexpected local exception: {}", error.getMessage()); LOG.debug("Exception trace: ", error); fireBridgeFailed(); }
public void onCommand(Object o) { Command command = (Command)o; serviceRemoteCommand(command); }
public void onException(IOException error) { serviceRemoteException(error); } });