use of org.eclipse.ecf.core.events.ContainerDisconnectingEvent in project ecf by eclipse.
the class UserInputDiscoveryLocator method disconnect.
/* (non-Javadoc)
* @see org.eclipse.ecf.core.IContainer#disconnect()
*/
public void disconnect() {
fireContainerEvent(new ContainerDisconnectingEvent(this.getID(), targetId));
fireContainerEvent(new ContainerConnectedEvent(this.getID(), targetId));
}
use of org.eclipse.ecf.core.events.ContainerDisconnectingEvent in project ecf by eclipse.
the class XMPPChatRoomContainer method disconnect.
public void disconnect() {
final ID groupID = getConnectedID();
fireContainerEvent(new ContainerDisconnectingEvent(this.getID(), groupID));
synchronized (getConnectLock()) {
// If we are currently connected
if (isConnected()) {
try {
multiuserchat.leave();
} catch (final Exception e) {
// $NON-NLS-1$
traceStack("Exception in multi user chat.leave", e);
}
}
connectionState = DISCONNECTED;
remoteServerID = null;
if (containerHelper != null)
containerHelper.disconnect();
this.connection = null;
}
// notify listeners
fireContainerEvent(new ContainerDisconnectedEvent(this.getID(), groupID));
}
use of org.eclipse.ecf.core.events.ContainerDisconnectingEvent in project ecf by eclipse.
the class RSExampleContainer method disconnect.
/*
* (non-Javadoc)
*
* @see org.eclipse.ecf.core.IContainer#disconnect()
*/
public void disconnect() {
fireContainerEvent(new ContainerDisconnectingEvent(getID(), targetID));
final ID oldID = targetID;
// XXX disconnect here
fireContainerEvent(new ContainerDisconnectedEvent(getID(), oldID));
}
use of org.eclipse.ecf.core.events.ContainerDisconnectingEvent in project ecf by eclipse.
the class MSNContainer method disconnect.
public void disconnect() {
if (client != null) {
fireContainerEvent(new ContainerDisconnectingEvent(guid, connectID));
client.disconnect();
fireContainerEvent(new ContainerDisconnectedEvent(guid, connectID));
for (Iterator it = chatSessions.values().iterator(); it.hasNext(); ) {
((ChatSession) it.next()).close();
}
chatSessions.clear();
connectID = null;
client = null;
Activator.getDefault().unregisterService(this);
}
}
use of org.eclipse.ecf.core.events.ContainerDisconnectingEvent in project ecf by eclipse.
the class DnsSdDiscoveryContainerAdapter method disconnect.
/* (non-Javadoc)
* @see org.eclipse.ecf.core.IContainer#disconnect()
*/
public void disconnect() {
fireContainerEvent(new ContainerDisconnectingEvent(this.getID(), getConnectedID()));
targetID = null;
fireContainerEvent(new ContainerDisconnectedEvent(this.getID(), getConnectedID()));
}
Aggregations