Package org.apache.maven.wagon.events
Class SessionEvent
java.lang.Object
java.util.EventObject
org.apache.maven.wagon.events.WagonEvent
org.apache.maven.wagon.events.SessionEvent
- All Implemented Interfaces:
Serializable
SessionEvent is used for notifying SessionListeners about
occurrences of various situations related.
The session event is emitted by
Wagon objects when
- Before connection to the repository will be opened
- After connection to the repository was opened
- After wagon has logged-in to the repository
- After wagon has logged-off from the repository
- Before connection to the repository will be closed
- After connection to the repository was closed
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe type of the event.private Exceptionstatic final intA SESSION was closed.static final intA SESSION was refused.static final intA SESSION was disconnected (not currently used).static final intA SESSION is about to be disconnected.static final intA SESSION was opened.static final intA SESSION was opened.static final intA SESSION was opened.static final intA SESSION was opened.static final intA SESSION is about to be opened.Fields inherited from class org.apache.maven.wagon.events.WagonEvent
timestampFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSessionEvent(Wagon wagon, int eventType) Creates new instance of SessionEventSessionEvent(Wagon wagon, Exception exception) Creates new instance of SessionEvent. -
Method Summary
Modifier and TypeMethodDescriptionintvoidsetEventType(int eventType) voidsetException(Exception exception) toString()Methods inherited from class org.apache.maven.wagon.events.WagonEvent
getTimestamp, getWagon, setTimestampMethods inherited from class java.util.EventObject
getSource
-
Field Details
-
SESSION_CLOSED
public static final int SESSION_CLOSEDA SESSION was closed.- See Also:
-
SESSION_DISCONNECTING
public static final int SESSION_DISCONNECTINGA SESSION is about to be disconnected.- See Also:
-
SESSION_DISCONNECTED
public static final int SESSION_DISCONNECTEDA SESSION was disconnected (not currently used).- See Also:
-
SESSION_CONNECTION_REFUSED
public static final int SESSION_CONNECTION_REFUSEDA SESSION was refused.- See Also:
-
SESSION_OPENING
public static final int SESSION_OPENINGA SESSION is about to be opened.- See Also:
-
SESSION_OPENED
public static final int SESSION_OPENEDA SESSION was opened.- See Also:
-
SESSION_LOGGED_IN
public static final int SESSION_LOGGED_INA SESSION was opened.- See Also:
-
SESSION_LOGGED_OFF
public static final int SESSION_LOGGED_OFFA SESSION was opened.- See Also:
-
SESSION_ERROR_OCCURRED
public static final int SESSION_ERROR_OCCURREDA SESSION was opened.- See Also:
-
eventType
private int eventTypeThe type of the event. One of the SESSSION_XXX constants -
exception
-
-
Constructor Details
-
SessionEvent
Creates new instance of SessionEvent- Parameters:
wagon-Wagonobject which created this eventeventType- the type of the event
-
SessionEvent
Creates new instance of SessionEvent. Sets event type toSESSION_ERROR_OCCURRED- Parameters:
wagon-Wagonobject which created this eventexception- the exception
-
-
Method Details
-
getEventType
public int getEventType()- Returns:
- Returns the type.
-
getException
- Returns:
- Returns the exception.
-
setEventType
public void setEventType(int eventType) - Parameters:
eventType- The eventType to set.
-
setException
- Parameters:
exception- The exception to set.
-
toString
- Overrides:
toStringin classEventObject
-