org.apache.maven.wagon.events

Class SessionEventSupport

public final class SessionEventSupport extends Object

The class allows registration and deregistration of session listeners

Version: $Id: SessionEventSupport.java 162476 2005-04-19 02:49:45Z brett $

Author: Michal Maczka

Field Summary
Listlisteners
registred listeners
Method Summary
voidaddSessionListener(SessionListener listener)
Adds the listener to the collection of listeners who will be notifed when any session event occurs in this Wagon object.
voidfireDebug(String message)
Dispatches the given debug message to all registred listeners (calls method debug on all of them}.
voidfireSessionConnectionRefused(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionConnectionRefused on all of them}.
voidfireSessionDisconnected(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionDisconnected on all of them}.
voidfireSessionDisconnecting(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionDisconnecting } on all of them}.
voidfireSessionError(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionConnectionRefused on all of them.
voidfireSessionLoggedIn(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionLoggedIn on all of them}.
voidfireSessionLoggedOff(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionLoggedOff on all of them}.
voidfireSessionOpened(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionOpened on all of them}.
voidfireSessionOpening(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionOpening on all of them}.
booleanhasSessionListener(SessionListener listener)
Returns whether the specified instance of session listener was added to the collection of listeners who will be notifed when an seesion event occurs
voidremoveSessionListener(SessionListener listener)
Removes the session listener from the collection of listeners so it no longer receives session events.

Field Detail

listeners

private final List listeners
registred listeners

Method Detail

addSessionListener

public void addSessionListener(SessionListener listener)
Adds the listener to the collection of listeners who will be notifed when any session event occurs in this Wagon object.
If listener is null, no exception is thrown and no action is performed

Parameters: listener the transfer listener

See Also: removeSessionListener TransferListener

fireDebug

public void fireDebug(String message)
Dispatches the given debug message to all registred listeners (calls method debug on all of them}.

Parameters: message the debug message which will be dispached to listeners

fireSessionConnectionRefused

public void fireSessionConnectionRefused(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionConnectionRefused on all of them}. The Event should be of type SESSION_CONNECTION_REFUSED

Parameters: sessionEvent the SessionEvent which will be dispached to listeners

fireSessionDisconnected

public void fireSessionDisconnected(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionDisconnected on all of them}. The Event should be of type SESSION_DISCONNECTED

Parameters: sessionEvent the SessionEvent which will be dispached to listeners

fireSessionDisconnecting

public void fireSessionDisconnecting(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionDisconnecting } on all of them}. The Event should be of type SESSION_DISCONNECTING

Parameters: sessionEvent the SessionEvent which will be dispached to listeners

fireSessionError

public void fireSessionError(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionConnectionRefused on all of them. The Event should be of type SESSION_ERROR_OCCURRED and it is expected that getException method will return not null value

Parameters: sessionEvent the SessionEvent which will be dispached to listeners

fireSessionLoggedIn

public void fireSessionLoggedIn(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionLoggedIn on all of them}. The Event should be of type SESSION_LOGGED_IN

Parameters: sessionEvent the SessionEvent which will be dispached to listeners

fireSessionLoggedOff

public void fireSessionLoggedOff(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionLoggedOff on all of them}. The Event should be of type SESSION_LOGGED_OFF

Parameters: sessionEvent the SessionEvent which will be dispached to listeners

fireSessionOpened

public void fireSessionOpened(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionOpened on all of them}. The Event should be of type SESSION_OPENED

Parameters: sessionEvent the SessionEvent which will be dispached to listeners

fireSessionOpening

public void fireSessionOpening(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method sessionOpening on all of them}. The Event should be of type SESSION_OPENING

Parameters: sessionEvent the SessionEvent which will be dispached to listeners

hasSessionListener

public boolean hasSessionListener(SessionListener listener)
Returns whether the specified instance of session listener was added to the collection of listeners who will be notifed when an seesion event occurs

Parameters: listener the session listener

Returns: true if given listner was added to the collection of listeners false otherwise

See Also: SessionListener addSessionListener

removeSessionListener

public void removeSessionListener(SessionListener listener)
Removes the session listener from the collection of listeners so it no longer receives session events.
If listener is null or specified listener was not added to this SessionEventSupport object no exception is thrown and no action is performed

Parameters: listener the session listener

See Also: addSessionListener