jerklib.events.impl
Class AwayEventImpl

java.lang.Object
  extended by jerklib.events.impl.AwayEventImpl
All Implemented Interfaces:
AwayEvent, IRCEvent

public class AwayEventImpl
extends Object
implements AwayEvent


Nested Class Summary
 
Nested classes/interfaces inherited from interface jerklib.events.AwayEvent
AwayEvent.EventType
 
Nested classes/interfaces inherited from interface jerklib.events.IRCEvent
IRCEvent.Type
 
Constructor Summary
AwayEventImpl(Session session, AwayEvent.EventType eventType, boolean away, boolean you, String nick, String rawEventData)
           
AwayEventImpl(String awayMessage, AwayEvent.EventType eventType, boolean away, boolean you, String nick, String rawEventData, Session session)
           
 
Method Summary
 String getAwayMessage()
          Returns the away message or an empty String if it was user of lib who caused the event to fire.
 AwayEvent.EventType getEventType()
          Return the event type that was fired
 String getNick()
          Get the nick who fired the event.
 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.
 boolean isAway()
          Whether or not subject of event is away.
 boolean isYou()
          Whether or not it was user of lib that caused this event
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AwayEventImpl

public AwayEventImpl(String awayMessage,
                     AwayEvent.EventType eventType,
                     boolean away,
                     boolean you,
                     String nick,
                     String rawEventData,
                     Session session)

AwayEventImpl

public AwayEventImpl(Session session,
                     AwayEvent.EventType eventType,
                     boolean away,
                     boolean you,
                     String nick,
                     String rawEventData)
Method Detail

getAwayMessage

public String getAwayMessage()
Description copied from interface: AwayEvent
Returns the away message or an empty String if it was user of lib who caused the event to fire.

Specified by:
getAwayMessage in interface AwayEvent
Returns:
the away message

isAway

public boolean isAway()
Description copied from interface: AwayEvent
Whether or not subject of event is away.

Specified by:
isAway in interface AwayEvent
Returns:
if we're away or not.

isYou

public boolean isYou()
Description copied from interface: AwayEvent
Whether or not it was user of lib that caused this event

Specified by:
isYou in interface AwayEvent
Returns:
if it was us or not.

getNick

public String getNick()
Description copied from interface: AwayEvent
Get the nick who fired the event.

Specified by:
getNick in interface AwayEvent
Returns:
the nick of the user who caused the event to fire.

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.

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

getEventType

public AwayEvent.EventType getEventType()
Description copied from interface: AwayEvent
Return the event type that was fired

Specified by:
getEventType in interface AwayEvent
Returns:
the type of event that was fired.
See Also:
AwayEvent.EventType