use of hudson.plugins.im.IMException in project ircbot-plugin by jenkinsci.
the class IRCConnectionProvider method createConnection.
@Override
public synchronized IMConnection createConnection() throws IMException {
releaseConnection();
if (getDescriptor() == null) {
throw new IMException("Descriptor not set");
}
IMConnection imConnection = new IRCConnection((IrcPublisher.DescriptorImpl) getDescriptor(), getAuthenticationHolder());
if (imConnection.connect()) {
return imConnection;
} else {
imConnection.close();
}
throw new IMException("Connection failed");
}
Aggregations