serviceRemoteCommand(remoteBrokerInfo);
}
public void start() throws Exception {
if (started.compareAndSet(false, true)) {
localBroker.setTransportListener(new DefaultTransportListener() {
@Override
public void onCommand(Object o) {
Command command = (Command) o;
serviceLocalCommand(command);
}
@Override
public void onException(IOException error) {
serviceLocalException(error);
}
});
remoteBroker.setTransportListener(new DefaultTransportListener() {
public void onCommand(Object o) {
Command command = (Command) o;
serviceRemoteCommand(command);
}