|
xmlBlaster 2.2.0 client API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xmlBlaster.util.dispatch.ConnectionStateEnum
public final class ConnectionStateEnum
This class simulates an enumeration for the connection states.
Note that this implementation has a fixed number of four states.
| Field Summary | |
|---|---|
static ConnectionStateEnum |
ALIVE
We have a connection (0). |
static ConnectionStateEnum |
DEAD
The connection is dead an no recovery is possible (2). |
static ConnectionStateEnum |
POLLING
We have lost the connection and are polling for it (1). |
static ConnectionStateEnum |
UNDEF
The connection state is not known (-1). |
| Method Summary | |
|---|---|
boolean |
equals(ConnectionStateEnum other)
|
int |
getInt()
Returns the int representation of this connectionState |
static ConnectionStateEnum |
parseConnectionState(java.lang.String state)
Parses given string to extract the connectionState of a message. |
static ConnectionStateEnum |
parseConnectionState(java.lang.String connectionState,
ConnectionStateEnum defaultConnectionState)
Parses given string to extract the connectionState of a message |
static ConnectionStateEnum |
toConnectionStateEnum(int connectionState)
Checks the given int and returns the corresponding ConnectionStateEnum instance. |
java.lang.String |
toString()
Return a human readable string of the connectionState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ConnectionStateEnum UNDEF
public static final ConnectionStateEnum ALIVE
public static final ConnectionStateEnum POLLING
public static final ConnectionStateEnum DEAD
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(ConnectionStateEnum other)
public final int getInt()
public static final ConnectionStateEnum toConnectionStateEnum(int connectionState)
throws java.lang.IllegalArgumentException
prio - For example 7
java.lang.IllegalArgumentException - if the given connectionState is invalid
public static final ConnectionStateEnum parseConnectionState(java.lang.String state)
throws java.lang.IllegalArgumentException
state - For example "POLLING"
java.lang.IllegalArgumentException - if the given connectionState is invalid
public static final ConnectionStateEnum parseConnectionState(java.lang.String connectionState,
ConnectionStateEnum defaultConnectionState)
prio - For example "polling" or "alive"defaultConnectionState - Value to use if not parsable
|
xmlBlaster 2.2.0 client API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||