public class IRCConnection extends Object implements hudson.plugins.im.IMConnection, PircListener.JoinListener, PircListener.InviteListener, PircListener.PartListener
IMConnection
.Constructor and Description |
---|
IRCConnection(IrcPublisher.DescriptorImpl descriptor,
hudson.plugins.im.AuthenticationHolder authentication) |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(hudson.plugins.im.IMConnectionListener listener) |
void |
channelJoined(String channelName)
Is called when the ircbot joins a channel.
|
void |
channelParted(String channelName)
Is called when the ircbot is disconnected (leaves or is kicked) from a channel.
|
void |
close() |
boolean |
connect() |
void |
inviteReceived(String channelName,
String inviter)
Is called when the ircbot is invited to a channel.
|
boolean |
isConnected() |
void |
removeConnectionListener(hudson.plugins.im.IMConnectionListener listener) |
void |
send(hudson.plugins.im.IMMessageTarget target,
String text) |
void |
send(String target,
String text) |
void |
setPresence(hudson.plugins.im.IMPresence presence,
String statusMessage) |
public IRCConnection(IrcPublisher.DescriptorImpl descriptor, hudson.plugins.im.AuthenticationHolder authentication)
public void close()
close
in interface hudson.plugins.im.IMConnection
public boolean isConnected()
isConnected
in interface hudson.plugins.im.IMConnection
public boolean connect()
connect
in interface hudson.plugins.im.IMConnection
public void channelJoined(String channelName)
PircListener.JoinListener
channelJoined
in interface PircListener.JoinListener
channelName
- Name of the IRC channel to act inpublic void inviteReceived(String channelName, String inviter)
PircListener.InviteListener
inviteReceived
in interface PircListener.InviteListener
channelName
- Name of the IRC channel to act ininviter
- Name of the IRC user who sent us an invitationpublic void channelParted(String channelName)
PircListener.PartListener
channelParted
in interface PircListener.PartListener
channelName
- Name of the IRC channel to act inpublic void addConnectionListener(hudson.plugins.im.IMConnectionListener listener)
addConnectionListener
in interface hudson.plugins.im.IMConnection
public void removeConnectionListener(hudson.plugins.im.IMConnectionListener listener)
removeConnectionListener
in interface hudson.plugins.im.IMConnection
public void send(hudson.plugins.im.IMMessageTarget target, String text) throws hudson.plugins.im.IMException
send
in interface hudson.plugins.im.IMConnection
hudson.plugins.im.IMException
public void send(String target, String text) throws hudson.plugins.im.IMException
hudson.plugins.im.IMException
public void setPresence(hudson.plugins.im.IMPresence presence, String statusMessage) throws hudson.plugins.im.IMException
setPresence
in interface hudson.plugins.im.IMConnection
hudson.plugins.im.IMException
Copyright © 2016–2020. All rights reserved.