There are 1 code examples for javax.management.remote.rmi.RMIConnector.
The API names are highlighted below.
You can use
button
to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.
Project Name: codecover Package: org.codecover.eclipse.livenotification
Source Code: LiveNotificationClient.java (Click to view .java file)
Method Code:
/**
* Disconnects the {@link LiveNotificationClient} if it was previously
* connected.
* @throws LiveNotificationExceptionWraps an {@link IOException} occurred while communicating
* with the server.
*/
public void disconnect() throws LiveNotificationException {
if (this.connector == null) {
return;
}
try {
try {
if (this.listener != null && this.serverDelegateObjectName != null) {
this.serverConnection.removeNotificationListener(this.serverDelegateObjectName,this.listener);
}
}
catch ( IOException e) {
throw new LiveNotificationIOException(ERROR_WITH_THE_CONNECTION,e);
}
catch ( InstanceNotFoundException e) {
throw new Error(e);
}
catch ( ListenerNotFoundException e) {
throw new Error(e);
}
try {
this.connector.close();
}
catch ( IOException e) {
throw new LiveNotificationIOException(ERROR_WITH_THE_CONNECTION,e);
}
}
finally {
this.connector=null;
this.serverConnection=null;
this.clientState=ConnectionState.NOT_CONNECTED;
sendStateChangeEvent();
}
}