See on Tõrva Gümnaasiumi vana veebilehe arhiiv. Uus veebileht: https://torva.edu.ee/

DCCChatServer (PJIRC project)

Lisamaterjalide loend

Algne fail: vana_veeb/pjirc/doc/javadoc/irc/dcc/prv/DCCChatServer.html.

========== START OF NAVBAR ==========
=========== END OF NAVBAR ===========
======== START OF CLASS DATA ========

irc.dcc.prv
Class DCCChatServer

java.lang.Object
  |
  +--irc.IRCObject
        |
        +--irc.dcc.prv.DCCChatServer
All Implemented Interfaces:
java.lang.Runnable, Server

public class DCCChatServer
extends IRCObject
implements java.lang.Runnable, Server

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, DCCChatClosingListener lis)
          Create a new DCCChat server.
 
Method Summary
 void close()
          Close this communication.
 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.lang.String getUserName()
          Get the username on this server.
 void openActive(DCCChat chat, java.lang.String ip, java.lang.String port)
          Open an active connection on the given chat.
 java.lang.String openPassive(DCCChat chat)
          Open a passive connection on the given chat.
 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.
 
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

DCCChatServer

public DCCChatServer(IRCConfiguration config,
                     java.lang.String thisNick,
                     java.lang.String remoteNick,
                     DCCChatClosingListener lis)
Create a new DCCChat server.

Parameters:
config - the global irc configuration.
thisNick - the local nick.
remoteNick - the remote nick.
lis - the closing listener.

Method Detail

openActive

public void openActive(DCCChat chat,
                       java.lang.String ip,
                       java.lang.String port)
Open an active connection on the given chat.

Parameters:
chat - the chat.
ip - the ip to contact.
port - the port to contact.


openPassive

public java.lang.String openPassive(DCCChat chat)
Open a passive connection on the given chat.

Parameters:
chat - the chat.
Returns:
the string to send to the remote peer to begin the communication.


run

public void run()
Specified by:
run in interface java.lang.Runnable

say

public void say(java.lang.String destination,
                java.lang.String str)
Description copied from interface: Server
Say the specified string. This string is sent as it to the remote server.

Specified by:
say in interface Server
Parameters:
destination - message destination.
str - message itself.


execute

public void execute(java.lang.String str)
Description copied from interface: Server
Execute the given command on the remote server.

Specified by:
execute in interface Server
Parameters:
str - the command to execute.


sendStatusMessage

public void sendStatusMessage(java.lang.String str)
Description copied from interface: Server
Send the given message to the server's status.

Specified by:
sendStatusMessage in interface Server
Parameters:
str - string to send to the status.


close

public void close()
Close this communication.


getNick

public java.lang.String getNick()
Description copied from interface: Server
Get the nickname on this server.

Specified by:
getNick in interface Server
Returns:
the nickname on the server.


getUserName

public java.lang.String getUserName()
Description copied from interface: Server
Get the username on this server.

Specified by:
getUserName in interface Server
Returns:
the username on this server.