jerklib.events.impl
Class WhoisEventImpl

java.lang.Object
  extended by jerklib.events.impl.WhoisEventImpl
All Implemented Interfaces:
IRCEvent, WhoisEvent

public class WhoisEventImpl
extends Object
implements WhoisEvent

Author:
mohadib
See Also:
WhoisEvent

Nested Class Summary
 
Nested classes/interfaces inherited from interface jerklib.events.IRCEvent
IRCEvent.Type
 
Constructor Summary
WhoisEventImpl(String nick, String realName, String user, String host, String rawEventData, Session session)
           
 
Method Summary
 void appendRawEventData(String rawEventData)
           
 List<String> getChannelNames()
          A list of channel names the user is joined to
 String getHost()
          the hostname of the whoised user
 String getNick()
          Gets the nick the whois event is about
 String getRawEventData()
          Returns the raw IRC data that makes up this event
 String getRealName()
          gets real name of whoised user
 Session getSession()
          Gets session for connection
 IRCEvent.Type getType()
          Used to find out the exact type of event the IRCEvent object is.
 String getUser()
          gets username of whoised user
 boolean isAnOperator()
          not impled
 boolean isIdle()
          returns true if person is idle , else false
 long secondsIdle()
          returns how many seconds person has been idle
 void setChannelNamesList(List<String> chanNames)
           
 void setSecondsIdle(int secondsIdle)
           
 void setSignOnTime(int signOnTime)
           
 void setWhoisServer(String whoisServer)
           
 void setWhoisServerInfo(String whoisServerInfo)
           
 Date signOnTime()
          returns sign on time
 String whoisServer()
          The hostname of the server who answered the whois query
 String whoisServerInfo()
          Gets whois server information
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhoisEventImpl

public WhoisEventImpl(String nick,
                      String realName,
                      String user,
                      String host,
                      String rawEventData,
                      Session session)
Method Detail

getChannelNames

public List<String> getChannelNames()
Description copied from interface: WhoisEvent
A list of channel names the user is joined to

Specified by:
getChannelNames in interface WhoisEvent
Returns:
List of Channel names

setChannelNamesList

public void setChannelNamesList(List<String> chanNames)
Parameters:
chanNames -

getHost

public String getHost()
Description copied from interface: WhoisEvent
the hostname of the whoised user

Specified by:
getHost in interface WhoisEvent
Returns:
hostname

getUser

public String getUser()
Description copied from interface: WhoisEvent
gets username of whoised user

Specified by:
getUser in interface WhoisEvent
Returns:
Username

getRealName

public String getRealName()
Description copied from interface: WhoisEvent
gets real name of whoised user

Specified by:
getRealName in interface WhoisEvent
Returns:
real name

getNick

public String getNick()
Description copied from interface: WhoisEvent
Gets the nick the whois event is about

Specified by:
getNick in interface WhoisEvent
Returns:
nick

isAnOperator

public boolean isAnOperator()
Description copied from interface: WhoisEvent
not impled

Specified by:
isAnOperator in interface WhoisEvent
Returns:
not impled

isIdle

public boolean isIdle()
Description copied from interface: WhoisEvent
returns true if person is idle , else false

Specified by:
isIdle in interface WhoisEvent
Returns:
true if person is idle , else false

secondsIdle

public long secondsIdle()
Description copied from interface: WhoisEvent
returns how many seconds person has been idle

Specified by:
secondsIdle in interface WhoisEvent
Returns:
amount in seconds person has been idle

setSecondsIdle

public void setSecondsIdle(int secondsIdle)
Parameters:
secondsIdle -

signOnTime

public Date signOnTime()
Description copied from interface: WhoisEvent
returns sign on time

Specified by:
signOnTime in interface WhoisEvent
Returns:
sign on time

setSignOnTime

public void setSignOnTime(int signOnTime)
Parameters:
signOnTime -

whoisServer

public String whoisServer()
Description copied from interface: WhoisEvent
The hostname of the server who answered the whois query

Specified by:
whoisServer in interface WhoisEvent
Returns:
hostname

setWhoisServer

public void setWhoisServer(String whoisServer)
Parameters:
whoisServer -

whoisServerInfo

public String whoisServerInfo()
Description copied from interface: WhoisEvent
Gets whois server information

Specified by:
whoisServerInfo in interface WhoisEvent
Returns:
server information

setWhoisServerInfo

public void setWhoisServerInfo(String whoisServerInfo)
Parameters:
whoisServerInfo -

getRawEventData

public String getRawEventData()
Description copied from interface: IRCEvent
Returns the raw IRC data that makes up this event

Specified by:
getRawEventData in interface IRCEvent
Returns:
Raw IRC event text.

appendRawEventData

public void appendRawEventData(String rawEventData)
Parameters:
rawEventData -

getSession

public Session getSession()
Description copied from interface: IRCEvent
Gets session for connection

Specified by:
getSession in interface IRCEvent
Returns:
Session

getType

public IRCEvent.Type getType()
Description copied from interface: IRCEvent
Used to find out the exact type of event the IRCEvent object is. The IRCEvent object can be cast into a more specific event object to get access to convience methods for the specific event types.

Specified by:
getType in interface IRCEvent
Returns:
Type of event