Package org.apache.maven.wagon.events
Class SessionEventSupport
- java.lang.Object
-
- org.apache.maven.wagon.events.SessionEventSupport
-
public final class SessionEventSupport extends java.lang.ObjectThe class allows registration and deregistration of session listeners
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<SessionListener>listenersregistered listeners
-
Constructor Summary
Constructors Constructor Description SessionEventSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSessionListener(SessionListener listener)Adds the listener to the collection of listeners who will be notified when any session event occurs in thisWagonobject.voidfireDebug(java.lang.String message)Dispatches 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 Detail
-
listeners
private final java.util.List<SessionListener> listeners
registered listeners
-
-
Method Detail
-
addSessionListener
public void addSessionListener(SessionListener listener)
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(SessionListener),TransferListener
-
removeSessionListener
public void removeSessionListener(SessionListener listener)
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:
addSessionListener(org.apache.maven.wagon.events.SessionListener)
-
hasSessionListener
public boolean hasSessionListener(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 occurs- Parameters:
listener- the session listener- Returns:
trueif given listener was added to the collection of listenersfalseotherwise- See Also:
SessionListener,addSessionListener(org.apache.maven.wagon.events.SessionListener)
-
fireSessionDisconnected
public void fireSessionDisconnected(SessionEvent sessionEvent)
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
public void fireSessionDisconnecting(SessionEvent sessionEvent)
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
public void fireSessionLoggedIn(SessionEvent sessionEvent)
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
public void fireSessionLoggedOff(SessionEvent sessionEvent)
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
public void fireSessionOpened(SessionEvent sessionEvent)
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
public void fireSessionOpening(SessionEvent sessionEvent)
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
public void fireSessionConnectionRefused(SessionEvent sessionEvent)
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
public void fireDebug(java.lang.String message)
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
public void fireSessionError(SessionEvent sessionEvent)
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
-
-