|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--irc.IRCObject | +--irc.dcc.prv.DCCChatServer
The DCCChat server. There is a distinct DCCChat server for each active DCCChat.
Field Summary |
Fields inherited from class irc.IRCObject |
_ircConfiguration |
Constructor Summary | |
DCCChatServer(IRCConfiguration config,
java.lang.String thisNick,
java.lang.String remoteNick)
Create a new DCCChat server. |
Method Summary | |
void |
addServerListener(ServerListener l)
Add a server listener. |
void |
close()
Close this communication. |
void |
connect()
Try to connect to the server, using default configuration. |
void |
disconnect()
Disconnect from the server. |
void |
enumerateSourcesAsCreated(ServerListener lis)
Enumerate all sources, as if they were created and notified to the given listener. |
void |
execute(java.lang.String str)
Execute the given command on the remote server. |
java.lang.String |
getNick()
Get the nickname on this server. |
java.util.Enumeration |
getSources()
Get an enumeration of all the sources associated with this server. |
java.lang.String |
getUserName()
Get the username on this server. |
boolean |
isConnected()
Test whether the server is connected. |
void |
leave()
Leave all sources, then leave the server. |
void |
openActive(java.lang.String ip,
java.lang.String port)
Open an active connection on the given chat. |
java.lang.String |
openPassive()
Open a passive connection on the given chat. |
void |
release()
Release this object. |
void |
removeServerListener(ServerListener l)
Remove a listener. |
void |
run()
|
void |
say(java.lang.String destination,
java.lang.String str)
Say the specified string. |
void |
sendStatusMessage(java.lang.String str)
Send the given message to the server's status. |
void |
setDefaultSource(Source s)
Set the default output source this server should use if the destination source is undefined. |
Methods inherited from class irc.IRCObject |
getColor, getIRCConfiguration, getText, getText, getText, getText, getTimeStamp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DCCChatServer(IRCConfiguration config, java.lang.String thisNick, java.lang.String remoteNick)
config
- the global irc configuration.thisNick
- the local nick.remoteNick
- the remote nick.Method Detail |
public void addServerListener(ServerListener l)
Server
addServerListener
in interface Server
l
- listener to add.public void removeServerListener(ServerListener l)
Server
removeServerListener
in interface Server
l
- listener to remove.public void connect()
Server
connect
in interface Server
public void disconnect()
Server
disconnect
in interface Server
public boolean isConnected()
Server
isConnected
in interface Server
public java.util.Enumeration getSources()
Server
getSources
in interface Server
public void enumerateSourcesAsCreated(ServerListener lis)
Server
enumerateSourcesAsCreated
in interface Server
lis
- listener to call.public void setDefaultSource(Source s)
Server
setDefaultSource
in interface Server
s
- default source.public void release()
IRCObject
release
in class IRCObject
public void openActive(java.lang.String ip, java.lang.String port)
ip
- the ip to contact.port
- the port to contact.public java.lang.String openPassive()
public void run()
run
in interface java.lang.Runnable
public void say(java.lang.String destination, java.lang.String str)
Server
say
in interface Server
destination
- message destination.str
- message itself.public void execute(java.lang.String str)
Server
execute
in interface Server
str
- the command to execute.public void sendStatusMessage(java.lang.String str)
Server
sendStatusMessage
in interface Server
str
- string to send to the status.public void close()
public void leave()
Server
leave
in interface Server
public java.lang.String getNick()
Server
getNick
in interface Server
public java.lang.String getUserName()
Server
getUserName
in interface Server
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |