jerklib.events.impl
Class MessageEventImpl

java.lang.Object
  extended by jerklib.events.impl.MessageEventImpl
All Implemented Interfaces:
IRCEvent, MessageEvent

public class MessageEventImpl
extends Object
implements MessageEvent

Author:
mohadib
See Also:
MessageEvent

Nested Class Summary
 
Nested classes/interfaces inherited from interface jerklib.events.IRCEvent
IRCEvent.Type
 
Constructor Summary
MessageEventImpl(Channel channel, String hostName, String message, String nick, String rawEventData, Session session, IRCEvent.Type type, String userName)
           
 
Method Summary
 Channel getChannel()
          returns IRCChannel object the PrivMsg occured in
 String getHostName()
          getHostName() returns a string that represents the host of the creator of this event
 String getMessage()
          getMessage() returns the message part of the event
 String getNick()
          returns the nick of the person who created the PrivMsgIRCEvent
 String getRawEventData()
          Returns the raw IRC data that makes up this event
 Session getSession()
          Gets session for connection
 IRCEvent.Type getType()
          Used to find out the exact type of event the IRCEvent object is.
 String getUserName()
          This will return the username field of the user's hostmask nick!username@host
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageEventImpl

public MessageEventImpl(Channel channel,
                        String hostName,
                        String message,
                        String nick,
                        String rawEventData,
                        Session session,
                        IRCEvent.Type type,
                        String userName)
Method Detail

getChannel

public Channel getChannel()
Description copied from interface: MessageEvent
returns IRCChannel object the PrivMsg occured in

Specified by:
getChannel in interface MessageEvent
Returns:
the Channel object

getHostName

public String getHostName()
Description copied from interface: MessageEvent
getHostName() returns a string that represents the host of the creator of this event

Specified by:
getHostName in interface MessageEvent
Returns:
the host name

getMessage

public String getMessage()
Description copied from interface: MessageEvent
getMessage() returns the message part of the event

Specified by:
getMessage in interface MessageEvent
Returns:
the message

getNick

public String getNick()
Description copied from interface: MessageEvent
returns the nick of the person who created the PrivMsgIRCEvent

Specified by:
getNick in interface MessageEvent
Returns:
the nick

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.

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

getUserName

public String getUserName()
Description copied from interface: MessageEvent
This will return the username field of the user's hostmask nick!username@host

Specified by:
getUserName in interface MessageEvent
Returns:
the login field

getSession

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

Specified by:
getSession in interface IRCEvent
Returns:
Session