/** * @see org.apache.activemq.Service#start() * @throws IOException * if the next channel has not been set. */ @Override public void start() throws Exception { if (next == null) { throw new IOException("The next channel has not been set."); } if (transportListener == null) { throw new IOException("The command listener has not been set."); } next.start(); }
@Override public void start() throws Exception { next.start(); startMonitorThreads(); }
public void start() throws Exception { LOG.info("Starting a network connection between {} and {} has been established.", localBroker, remoteBroker); localBroker.setTransportListener(new DefaultTransportListener() { public void onCommand(Object o) { Command command = (Command)o; serviceLocalCommand(command); } public void onException(IOException error) { serviceLocalException(error); } }); remoteBroker.setTransportListener(new DefaultTransportListener() { public void onCommand(Object o) { Command command = (Command)o; serviceRemoteCommand(command); } public void onException(IOException error) { serviceRemoteException(error); } }); localBroker.start(); remoteBroker.start(); }
@Override protected void doStart() throws Exception { LOG.info("Starting " + this); configuredTransport.setTransportListener(new TransportListener() { @Override public void onCommand(Object o) { final Command command = (Command)o; processInboundConnection(command); } @Override public void onException(IOException error) { LOG.error("Caught: " + error, error); } @Override public void transportInterupted() { } @Override public void transportResumed() { } }); configuredTransport.start(); }
protected void restoreTransport(FanoutTransportHandler th) throws Exception, IOException { th.transport.start(); stateTracker.setRestoreConsumers(th.transport == primary); stateTracker.restore(th.transport); for (Iterator<RequestCounter> iter2 = requestMap.values().iterator(); iter2.hasNext();) { RequestCounter rc = iter2.next(); th.transport.oneway(rc.command); } }
/** * @see org.apache.activemq.Service#start() * @throws IOException * if the next channel has not been set. */ @Override public void start() throws Exception { if (getNext() == null) { throw new IOException("The next channel has not been set."); } if (transportListener == null) { throw new IOException("The command listener has not been set."); } getNext().start(); }
protected void restoreTransport(Transport t) throws Exception, IOException { t.start(); // send information to the broker - informing it we are an ft client ConnectionControl cc = new ConnectionControl(); cc.setFaultTolerant(true); t.oneway(cc); stateTracker.restore(t); Map<Integer, Command> tmpMap = null; synchronized (requestMap) { tmpMap = new LinkedHashMap<Integer, Command>(requestMap); } for (Command command : tmpMap.values()) { LOG.trace("restore requestMap, replay: {}", command); t.oneway(command); } }
protected void handleStart() throws Exception { if (remoteTransport == null) { if (remoteURI == null) { throw new IllegalArgumentException("You must specify the remoteURI property"); } remoteTransport = TransportFactory.connect(remoteURI); } if (localTransport == null) { localTransport = createLocalTransport(); } bridge = createBridge(localTransport, remoteTransport); configureBridge(bridge); bridge.start(); // we need to start the transports after we've created the bridge remoteTransport.start(); localTransport.start(); super.handleStart(); }
Transport t = TransportFactory.compositeConnect(uri); t.setTransportListener(bt); t.start(); bt.setTransport(t); if (priorityBackup && isPriority(uri)) {
transport.start();
taskRunner = null; transport.start(); active = true; BrokerInfo info = connector.getBrokerInfo().copy();
transport.start();
@Override public void start() throws Exception { next.start(); startMonitorThreads(); }
@Override public void start() throws Exception { next.start(); startMonitorThreads(); }
protected void restoreTransport(FanoutTransportHandler th) throws Exception, IOException { th.transport.start(); stateTracker.setRestoreConsumers(th.transport == primary); stateTracker.restore(th.transport); for (Iterator<RequestCounter> iter2 = requestMap.values().iterator(); iter2.hasNext();) { RequestCounter rc = iter2.next(); th.transport.oneway(rc.command); } }
@Override protected void doStart() throws Exception { transport.setTransportListener(getTransportListener()); socketTransportStarted.countDown(); transport.start(); }
protected void restoreTransport(FanoutTransportHandler th) throws Exception, IOException { th.transport.start(); stateTracker.setRestoreConsumers(th.transport == primary); stateTracker.restore(th.transport); for (Iterator<RequestCounter> iter2 = requestMap.values().iterator(); iter2.hasNext();) { RequestCounter rc = iter2.next(); th.transport.oneway(rc.command); } }
@Override protected void doStart() throws Exception { transport.setTransportListener(getTransportListener()); socketTransportStarted.countDown(); transport.start(); }