Package org.apache.maven.wagon.events
Class SessionEventSupport
java.lang.Object
org.apache.maven.wagon.events.SessionEventSupport
The class allows registration and deregistration of session listeners
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSessionListener(SessionListener listener) Adds the listener to the collection of listeners who will be notified when any session event occurs in thisWagonobject.voidDispatches the given debug message to all registered listeners (calls methodSessionListener.debug(String)on all of them}.voidfireSessionConnectionRefused(SessionEvent sessionEvent) Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionConnectionRefused(SessionEvent)on all of them}.voidfireSessionDisconnected(SessionEvent sessionEvent) Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionDisconnected(SessionEvent)on all of them}.voidfireSessionDisconnecting(SessionEvent sessionEvent) Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionDisconnecting(SessionEvent)} on all of them}.voidfireSessionError(SessionEvent sessionEvent) Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionConnectionRefused(SessionEvent)on all of them}.voidfireSessionLoggedIn(SessionEvent sessionEvent) Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionLoggedIn(SessionEvent)on all of them}.voidfireSessionLoggedOff(SessionEvent sessionEvent) Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionLoggedOff(SessionEvent)on all of them}.voidfireSessionOpened(SessionEvent sessionEvent) Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionOpened(SessionEvent)on all of them}.voidfireSessionOpening(SessionEvent sessionEvent) Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionOpening(SessionEvent)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 notified when an session event occursvoidremoveSessionListener(SessionListener listener) Removes the session listener from the collection of listeners so it no longer receives session events.
-
Field Details
-
listeners
registered listeners
-
-
Constructor Details
-
SessionEventSupport
public SessionEventSupport()
-
-
Method Details
-
addSessionListener
Adds the listener to the collection of listeners who will be notified when any session event occurs in thisWagonobject.
If listener isnull, no exception is thrown and no action is performed- Parameters:
listener- the transfer listener- See Also:
-
removeSessionListener
Removes the session listener from the collection of listeners so it no longer receives session events.
If listener isnullor specified listener was not added to thisSessionEventSupportobject no exception is thrown and no action is performed- Parameters:
listener- the session listener- See Also:
-
hasSessionListener
Returns whether the specified instance of session listener was added to the collection of listeners who will be notified when an session event occurs- Parameters:
listener- the session listener- Returns:
trueif given listener was added to the collection of listenersfalseotherwise- See Also:
-
fireSessionDisconnected
Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionDisconnected(SessionEvent)on all of them}. The Event should be of typeSessionEvent.SESSION_DISCONNECTED- Parameters:
sessionEvent- the SessionEvent which will be dispatched to listeners
-
fireSessionDisconnecting
Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionDisconnecting(SessionEvent)} on all of them}. The Event should be of typeSessionEvent.SESSION_DISCONNECTING- Parameters:
sessionEvent- the SessionEvent which will be dispatched to listeners
-
fireSessionLoggedIn
Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionLoggedIn(SessionEvent)on all of them}. The Event should be of typeSessionEvent.SESSION_LOGGED_IN- Parameters:
sessionEvent- the SessionEvent which will be dispatched to listeners
-
fireSessionLoggedOff
Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionLoggedOff(SessionEvent)on all of them}. The Event should be of typeSessionEvent.SESSION_LOGGED_OFF- Parameters:
sessionEvent- the SessionEvent which will be dispatched to listeners
-
fireSessionOpened
Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionOpened(SessionEvent)on all of them}. The Event should be of typeSessionEvent.SESSION_OPENED- Parameters:
sessionEvent- the SessionEvent which will be dispatched to listeners
-
fireSessionOpening
Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionOpening(SessionEvent)on all of them}. The Event should be of typeSessionEvent.SESSION_OPENING- Parameters:
sessionEvent- the SessionEvent which will be dispatched to listeners
-
fireSessionConnectionRefused
Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionConnectionRefused(SessionEvent)on all of them}. The Event should be of typeSessionEvent.SESSION_CONNECTION_REFUSED- Parameters:
sessionEvent- the SessionEvent which will be dispatched to listeners
-
fireDebug
Dispatches the given debug message to all registered listeners (calls methodSessionListener.debug(String)on all of them}.- Parameters:
message- the debug message which will be dispatched to listeners
-
fireSessionError
Dispatches the givenSessionEventto all registered listeners (calls methodSessionListener.sessionConnectionRefused(SessionEvent)on all of them}. The Event should be of typeSessionEvent.SESSION_ERROR_OCCURREDand it is expected thatSessionEvent.getException()method will return not null value- Parameters:
sessionEvent- the SessionEvent which will be dispatched to listeners
-