|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjerklib.DefaultInternalEventHandler
public class DefaultInternalEventHandler
Class that will only handle events that effect internal states/caches. Like channel nick lists. All events will be added to the ConnectionManager for relaying. You can change the internal behavior of Jerklib by overriding methods in this class or by adding/removing event handlers.
IRCEventListener
Constructor Summary | |
---|---|
DefaultInternalEventHandler(ConnectionManager manager)
Creates a new DefaultInternalEventHandler associated with the given ConnectionManager |
Method Summary | |
---|---|
void |
addEventHandler(IRCEvent.Type type,
IRCEventListener listener)
Adds an IRCEventListener to handle a given event Type. |
void |
connectionComplete(IRCEvent e)
Called when ConnectionComplete event is received. |
IRCEventListener |
getEventHandler(IRCEvent.Type type)
Returns the event handler registerd to the Type given. |
void |
join(IRCEvent e)
Called when a JoinEvent is received. |
void |
joinComplete(IRCEvent e)
Called when a JoinCompleteEvent is received |
void |
kick(IRCEvent e)
Called when a KickEvent is received |
void |
mode(IRCEvent event)
Called when a ModeEvent is received |
void |
nick(IRCEvent e)
Called when a NickChangeEvent is received |
void |
nickInUse(IRCEvent e)
Called when a NickInUseEvent is received |
void |
part(IRCEvent e)
Called when a PartEvent is received. |
void |
quit(IRCEvent e)
Called when a QuitEvent is received. |
void |
receiveEvent(IRCEvent event)
recieveEvent() - receive IRCEvents |
boolean |
removeEventHandler(IRCEvent.Type type)
Removes any internal IRCEventListeners registered to handle the Type passed in. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultInternalEventHandler(ConnectionManager manager)
manager
- Method Detail |
---|
public void addEventHandler(IRCEvent.Type type, IRCEventListener listener)
type
- listener
- public boolean removeEventHandler(IRCEvent.Type type)
type
-
public IRCEventListener getEventHandler(IRCEvent.Type type)
type
-
public void receiveEvent(IRCEvent event)
IRCEventListener
receiveEvent
in interface IRCEventListener
event
- IRCEvent the event
public void joinComplete(IRCEvent e)
e
- the eventpublic void join(IRCEvent e)
e
- the eventpublic void quit(IRCEvent e)
e
- the eventpublic void part(IRCEvent e)
e
- the eventpublic void nick(IRCEvent e)
e
- the eventpublic void nickInUse(IRCEvent e)
e
- the eventpublic void kick(IRCEvent e)
e
- the eventpublic void connectionComplete(IRCEvent e)
e
- the eventpublic void mode(IRCEvent event)
event
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |