org.apache.maven.wagon.events
Class SessionEventSupport

java.lang.Object
  extended by org.apache.maven.wagon.events.SessionEventSupport

public final class SessionEventSupport
extends Object

The class allows registration and deregistration of session listeners

Version:
$Id: SessionEventSupport.java 682051 2008-08-02 21:29:38Z hboutemy $
Author:
Michal Maczka

Constructor Summary
SessionEventSupport()
           
 
Method Summary
 void addSessionListener(SessionListener listener)
          Adds the listener to the collection of listeners who will be notified when any session event occurs in this Wagon object.
 void fireDebug(String message)
          Dispatches the given debug message to all registered listeners (calls method SessionListener.debug(String) on all of them}.
 void fireSessionConnectionRefused(SessionEvent sessionEvent)
          Dispatches the given SessionEvent to all registered listeners (calls method SessionListener.sessionConnectionRefused(SessionEvent) on all of them}.
 void fireSessionDisconnected(SessionEvent sessionEvent)
          Dispatches the given SessionEvent to all registered listeners (calls method SessionListener.sessionDisconnected(SessionEvent) on all of them}.
 void fireSessionDisconnecting(SessionEvent sessionEvent)
          Dispatches the given SessionEvent to all registered listeners (calls method SessionListener.sessionDisconnecting(SessionEvent) } on all of them}.
 void fireSessionError(SessionEvent sessionEvent)
          Dispatches the given SessionEvent to all registered listeners (calls method SessionListener.sessionConnectionRefused(SessionEvent) on all of them}.
 void fireSessionLoggedIn(SessionEvent sessionEvent)
          Dispatches the given SessionEvent to all registered listeners (calls method SessionListener.sessionLoggedIn(SessionEvent) on all of them}.
 void fireSessionLoggedOff(SessionEvent sessionEvent)
          Dispatches the given SessionEvent to all registered listeners (calls method SessionListener.sessionLoggedOff(SessionEvent) on all of them}.
 void fireSessionOpened(SessionEvent sessionEvent)
          Dispatches the given SessionEvent to all registered listeners (calls method SessionListener.sessionOpened(SessionEvent) on all of them}.
 void fireSessionOpening(SessionEvent sessionEvent)
          Dispatches the given SessionEvent to all registered 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 notified when an session event occurs
 void removeSessionListener(SessionListener listener)
          Removes the session listener from the collection of listeners so it no longer receives session events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionEventSupport

public SessionEventSupport()
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 this Wagon object.
If listener is null, 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 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(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:
true if given listener was added to the collection of listeners false otherwise
See Also:
SessionListener, addSessionListener(org.apache.maven.wagon.events.SessionListener)

fireSessionDisconnected

public void fireSessionDisconnected(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registered 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 dispatched to listeners

fireSessionDisconnecting

public void fireSessionDisconnecting(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registered 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 dispatched to listeners

fireSessionLoggedIn

public void fireSessionLoggedIn(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registered 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 dispatched to listeners

fireSessionLoggedOff

public void fireSessionLoggedOff(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registered 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 dispatched to listeners

fireSessionOpened

public void fireSessionOpened(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registered 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 dispatched to listeners

fireSessionOpening

public void fireSessionOpening(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registered 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 dispatched to listeners

fireSessionConnectionRefused

public void fireSessionConnectionRefused(SessionEvent sessionEvent)
Dispatches the given SessionEvent to all registered 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 dispatched to listeners

fireDebug

public void fireDebug(String message)
Dispatches the given debug message to all registered listeners (calls method SessionListener.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 given SessionEvent to all registered 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 dispatched to listeners


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.