org.apache.maven.wagon.events

Class SessionEventSupport


public final class SessionEventSupport
extends java.lang.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

Method Summary

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.
void
fireDebug(String message)
Dispatches the given debug message to all registred listeners (calls method SessionListener.debug(String) on all of them}.
void
fireSessionConnectionRefused(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method SessionListener.sessionConnectionRefused(SessionEvent) on all of them}.
void
fireSessionDisconnected(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method SessionListener.sessionDisconnected(SessionEvent) on all of them}.
void
fireSessionDisconnecting(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method SessionListener.sessionDisconnecting(SessionEvent) } on all of them}.
void
fireSessionError(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method SessionListener.sessionConnectionRefused(SessionEvent) on all of them.
void
fireSessionLoggedIn(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method SessionListener.sessionLoggedIn(SessionEvent) on all of them}.
void
fireSessionLoggedOff(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method SessionListener.sessionLoggedOff(SessionEvent) on all of them}.
void
fireSessionOpened(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method SessionListener.sessionOpened(SessionEvent) on all of them}.
void
fireSessionOpening(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registred listeners (calls method SessionListener.sessionOpening(SessionEvent) on all of them}.
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
void
removeSessionListener(SessionListener listener)
Removes the session listener from the collection of listeners so it no longer receives session events.

Method Details

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

fireDebug

public void fireDebug(String message)
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 SessionListener.sessionConnectionRefused(SessionEvent) on all of them}. The Event should be of type SessionEvent.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 SessionListener.sessionDisconnected(SessionEvent) on all of them}. The Event should be of type SessionEvent.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 SessionListener.sessionDisconnecting(SessionEvent) } on all of them}. The Event should be of type SessionEvent.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 SessionListener.sessionConnectionRefused(SessionEvent) on all of them. The Event should be of type SessionEvent.SESSION_ERROR_OCCURRED and it is expected that SessionEvent.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 SessionListener.sessionLoggedIn(SessionEvent) on all of them}. The Event should be of type SessionEvent.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 SessionListener.sessionLoggedOff(SessionEvent) on all of them}. The Event should be of type SessionEvent.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 SessionListener.sessionOpened(SessionEvent) on all of them}. The Event should be of type SessionEvent.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 SessionListener.sessionOpening(SessionEvent) on all of them}. The Event should be of type SessionEvent.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

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