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
- Author:
- Michal Maczka
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A SESSION was closed.static final int
A SESSION was refused.static final int
A SESSION was disconnected (not currently used).static final int
A SESSION is about to be disconnected.static final int
A SESSION was opened.static final int
A SESSION was opened.static final int
A SESSION was opened.static final int
A SESSION was opened.static final int
A SESSION is about to be opened.Fields inherited from class org.apache.maven.wagon.events.WagonEvent
timestamp
Fields 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 TypeMethodDescriptionint
void
setEventType
(int eventType) void
setException
(Exception exception) toString()
Methods inherited from class org.apache.maven.wagon.events.WagonEvent
getTimestamp, getWagon, setTimestamp
Methods 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:
-
-
Constructor Details
-
SessionEvent
Creates new instance of SessionEvent- Parameters:
wagon
-Wagon
object which created this event
eventType
- the type of the event
-
SessionEvent
Creates new instance of SessionEvent. Sets event type toSESSION_ERROR_OCCURRED
- Parameters:
wagon
-Wagon
object which created this event
exception
- 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:
toString
in classEventObject
-