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
- Author:
- Michal Maczka
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSessionListener
(SessionListener listener) Adds the listener to the collection of listeners who will be notified when any session event occurs in thisWagon
object.void
Dispatches the given debug message to all registered listeners (calls methodSessionListener.debug(String)
on all of them}.void
fireSessionConnectionRefused
(SessionEvent sessionEvent) Dispatches the givenSessionEvent
to all registered listeners (calls methodSessionListener.sessionConnectionRefused(SessionEvent)
on all of them}.void
fireSessionDisconnected
(SessionEvent sessionEvent) Dispatches the givenSessionEvent
to all registered listeners (calls methodSessionListener.sessionDisconnected(SessionEvent)
on all of them}.void
fireSessionDisconnecting
(SessionEvent sessionEvent) Dispatches the givenSessionEvent
to all registered listeners (calls methodSessionListener.sessionDisconnecting(SessionEvent)
} on all of them}.void
fireSessionError
(SessionEvent sessionEvent) Dispatches the givenSessionEvent
to all registered listeners (calls methodSessionListener.sessionConnectionRefused(SessionEvent)
on all of them}.void
fireSessionLoggedIn
(SessionEvent sessionEvent) Dispatches the givenSessionEvent
to all registered listeners (calls methodSessionListener.sessionLoggedIn(SessionEvent)
on all of them}.void
fireSessionLoggedOff
(SessionEvent sessionEvent) Dispatches the givenSessionEvent
to all registered listeners (calls methodSessionListener.sessionLoggedOff(SessionEvent)
on all of them}.void
fireSessionOpened
(SessionEvent sessionEvent) Dispatches the givenSessionEvent
to all registered listeners (calls methodSessionListener.sessionOpened(SessionEvent)
on all of them}.void
fireSessionOpening
(SessionEvent sessionEvent) Dispatches the givenSessionEvent
to all registered listeners (calls methodSessionListener.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 notified when an session event occursvoid
removeSessionListener
(SessionListener listener) Removes the session listener from the collection of listeners so it no longer receives session events.
-
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 thisWagon
object.
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 isnull
or specified listener was not added to thisSessionEventSupport
object 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:
true
if given listener was added to the collection of listeners
false
otherwise- See Also:
-
fireSessionDisconnected
Dispatches the givenSessionEvent
to 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 givenSessionEvent
to 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 givenSessionEvent
to 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 givenSessionEvent
to 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 givenSessionEvent
to 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 givenSessionEvent
to 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 givenSessionEvent
to 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 givenSessionEvent
to all registered listeners (calls methodSessionListener.sessionConnectionRefused(SessionEvent)
on all of them}. The Event should be of typeSessionEvent.SESSION_ERROR_OCCURRED
and it is expected thatSessionEvent.getException()
method will return not null value- Parameters:
sessionEvent
- the SessionEvent which will be dispatched to listeners
-