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:
java.io.Serializable
public class SessionEvent extends WagonEvent
SessionEvent is used for notifying SessionListeners about occurrences of various situations related. The session event is emitted byWagon
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
SESSION_CLOSED
A SESSION was closed.static int
SESSION_CONNECTION_REFUSED
A SESSION was refused.static int
SESSION_DISCONNECTED
A SESSION was disconnected (not currently used).static int
SESSION_DISCONNECTING
A SESSION is about to be disconnected.static int
SESSION_ERROR_OCCURRED
A SESSION was opened.static int
SESSION_LOGGED_IN
A SESSION was opened.static int
SESSION_LOGGED_OFF
A SESSION was opened.static int
SESSION_OPENED
A SESSION was opened.static int
SESSION_OPENING
A SESSION is about to be opened.-
Fields inherited from class org.apache.maven.wagon.events.WagonEvent
timestamp
-
-
Constructor Summary
Constructors Constructor Description SessionEvent(Wagon wagon, int eventType)
Creates new instance of SessionEventSessionEvent(Wagon wagon, java.lang.Exception exception)
Creates new instance of SessionEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEventType()
java.lang.Exception
getException()
void
setEventType(int eventType)
void
setException(java.lang.Exception exception)
java.lang.String
toString()
-
Methods inherited from class org.apache.maven.wagon.events.WagonEvent
getTimestamp, getWagon, setTimestamp
-
-
-
-
Field Detail
-
SESSION_CLOSED
public static final int SESSION_CLOSED
A SESSION was closed.- See Also:
- Constant Field Values
-
SESSION_DISCONNECTING
public static final int SESSION_DISCONNECTING
A SESSION is about to be disconnected.- See Also:
- Constant Field Values
-
SESSION_DISCONNECTED
public static final int SESSION_DISCONNECTED
A SESSION was disconnected (not currently used).- See Also:
- Constant Field Values
-
SESSION_CONNECTION_REFUSED
public static final int SESSION_CONNECTION_REFUSED
A SESSION was refused.- See Also:
- Constant Field Values
-
SESSION_OPENING
public static final int SESSION_OPENING
A SESSION is about to be opened.- See Also:
- Constant Field Values
-
SESSION_OPENED
public static final int SESSION_OPENED
A SESSION was opened.- See Also:
- Constant Field Values
-
SESSION_LOGGED_IN
public static final int SESSION_LOGGED_IN
A SESSION was opened.- See Also:
- Constant Field Values
-
SESSION_LOGGED_OFF
public static final int SESSION_LOGGED_OFF
A SESSION was opened.- See Also:
- Constant Field Values
-
SESSION_ERROR_OCCURRED
public static final int SESSION_ERROR_OCCURRED
A SESSION was opened.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SessionEvent
public SessionEvent(Wagon wagon, int eventType)
Creates new instance of SessionEvent- Parameters:
wagon
-Wagon
object which created this event
eventType
- the type of the event
-
SessionEvent
public SessionEvent(Wagon wagon, java.lang.Exception exception)
Creates new instance of SessionEvent. Sets event type toSESSION_ERROR_OCCURRED
- Parameters:
wagon
-Wagon
object which created this event
exception
- the exception
-
-
Method Detail
-
getEventType
public int getEventType()
- Returns:
- Returns the type.
-
getException
public java.lang.Exception getException()
- Returns:
- Returns the exception.
-
setEventType
public void setEventType(int eventType)
- Parameters:
eventType
- The eventType to set.
-
setException
public void setException(java.lang.Exception exception)
- Parameters:
exception
- The exception to set.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.util.EventObject
-
-