final Slot disconnectEvent = new Slot();
sender.addTransportStatusEventListener(new TransportStatusEventListener() {
public void statusChanged(TransportStatusEvent e) {
if( e.getChannelStatus() == TransportStatusEvent.DISCONNECTED ) {
try {
disconnectEvent.offer(e, 1000);
} catch (InterruptedException e1) {
}
}
}
});