rero.dcc

Class ProtocolDCC

public abstract class ProtocolDCC extends Object

Field Summary
protected ProtocolDispatcherdispatcher
static intDCC_CHAT
static intDCC_RECEIVE
static intDCC_SEND
static intDCC_TIMEOUT
protected HashMapeventData
protected longidleTime
protected Stringnickname
protected Socketsocket
protected longstartTime
protected intstate
static intSTATE_CLOSED
static intSTATE_OPEN
static intSTATE_WAIT
Method Summary
voidannounceFramework(ChatFramework f)
tells the protocol implementation class that we are ready to rock and roll, Socket is assumed to be connected.
voidclose()
abstract voidfireError(String text)
longgetIdleTime()
returns the number of milliseconds since this chat has been active
intgetLocalPort()
StringgetNickname()
returns the nickname of who we are having a *chat* with
intgetPort()
StringgetRemoteAddress()
longgetStartTime()
return time that this chat started
intgetState()
longgetTotalTime()
return total amount of time this chat has been active (in milliseconds)
abstract intgetTypeOfDCC()
return the type of DCC based on a constant
booleanisConnected()
returns wether or not the socket is connected
abstract voidrun()
voidsetDCCSocket(Socket _socket)

Field Detail

dispatcher

protected ProtocolDispatcher dispatcher

DCC_CHAT

public static final int DCC_CHAT

DCC_RECEIVE

public static final int DCC_RECEIVE

DCC_SEND

public static final int DCC_SEND

DCC_TIMEOUT

public static final int DCC_TIMEOUT

eventData

protected HashMap eventData

idleTime

protected long idleTime

nickname

protected String nickname

socket

protected Socket socket

startTime

protected long startTime

state

protected int state

STATE_CLOSED

public static final int STATE_CLOSED

STATE_OPEN

public static final int STATE_OPEN

STATE_WAIT

public static final int STATE_WAIT

Method Detail

announceFramework

public void announceFramework(ChatFramework f)
tells the protocol implementation class that we are ready to rock and roll, Socket is assumed to be connected.

close

public void close()

fireError

public abstract void fireError(String text)

getIdleTime

public long getIdleTime()
returns the number of milliseconds since this chat has been active

getLocalPort

public int getLocalPort()

getNickname

public String getNickname()
returns the nickname of who we are having a *chat* with

getPort

public int getPort()

getRemoteAddress

public String getRemoteAddress()

getStartTime

public long getStartTime()
return time that this chat started

getState

public int getState()

getTotalTime

public long getTotalTime()
return total amount of time this chat has been active (in milliseconds)

getTypeOfDCC

public abstract int getTypeOfDCC()
return the type of DCC based on a constant

isConnected

public boolean isConnected()
returns wether or not the socket is connected

run

public abstract void run()

setDCCSocket

public void setDCCSocket(Socket _socket)