jerklib.events.impl
Class WhoEventImpl

java.lang.Object
  extended by jerklib.events.impl.WhoEventImpl
All Implemented Interfaces:
IRCEvent, WhoEvent

public class WhoEventImpl
extends Object
implements WhoEvent

Created: Jan 31, 2008 6:31:31 PM

Author:
Robert O'Connor
See Also:
WhoEvent

Nested Class Summary
 
Nested classes/interfaces inherited from interface jerklib.events.IRCEvent
IRCEvent.Type
 
Constructor Summary
WhoEventImpl(String channel, int hopCount, String hostName, boolean away, String nick, String rawEventData, String realName, String serverName, Session session, String userName)
           
 
Method Summary
 String getChannel()
          Retrieve the channel (for when you WHO a channel)
 int getHopCount()
          Returns the number of hops between you and the user.
 String getHostName()
          Get the hostname of the user
 String getNick()
          Get the nick of the user
 String getRawEventData()
          Returns the raw IRC data that makes up this event
 String getRealName()
          Get the real name of the user.
 String getServerName()
          Get the server the user is on.
 Session getSession()
          Gets session for connection
 IRCEvent.Type getType()
          Used to find out the exact type of event the IRCEvent object is.
 String getUserName()
          Get the username of the user
 boolean isAway()
          Get whether or not the user is away.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhoEventImpl

public WhoEventImpl(String channel,
                    int hopCount,
                    String hostName,
                    boolean away,
                    String nick,
                    String rawEventData,
                    String realName,
                    String serverName,
                    Session session,
                    String userName)
Method Detail

getNick

public String getNick()
Get the nick of the user

Specified by:
getNick in interface WhoEvent
Returns:
the nick of the user.

getUserName

public String getUserName()
Get the username of the user

Specified by:
getUserName in interface WhoEvent
Returns:
the username

getHostName

public String getHostName()
Get the hostname of the user

Specified by:
getHostName in interface WhoEvent
Returns:
the hostname

getRealName

public String getRealName()
Get the real name of the user.

Specified by:
getRealName in interface WhoEvent
Returns:
the real name

getChannel

public String getChannel()
Retrieve the channel (for when you WHO a channel)

Specified by:
getChannel in interface WhoEvent
Returns:
the channel or an empty String

isAway

public boolean isAway()
Get whether or not the user is away.

Specified by:
isAway in interface WhoEvent
Returns:
whether or not the user is away.

getType

public IRCEvent.Type getType()
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

getRawEventData

public String getRawEventData()
Returns the raw IRC data that makes up this event

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

getHopCount

public int getHopCount()
Description copied from interface: WhoEvent
Returns the number of hops between you and the user.

Specified by:
getHopCount in interface WhoEvent
Returns:
the hop count

getSession

public Session getSession()
Gets session for connection

Specified by:
getSession in interface IRCEvent
Returns:
Session

getServerName

public String getServerName()
Description copied from interface: WhoEvent
Get the server the user is on.

Specified by:
getServerName in interface WhoEvent
Returns:
the server.