|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
java.beans.PropertyChangeEvent
net.java.sip.communicator.service.protocol.event.RegistrationStateChangeEvent
public class RegistrationStateChangeEvent
Instances of this class represent a change in the status of the provider that triggerred them. A status change may have occurred because the user requested it or because an error or a failure have occurred, in which case the reason and reason code would be set accordingly.
Keep in mind that reasons are not localized and services such as the user interface should only show them in a "details box". In the rest of the time, such services should consult the error code and provide corresponding, localized, reason phrases.
Note, that we have tried to provide a maximum number of error codes in order to enumerate all possible reason codes that may be returned from servers in the various protocols. Each protocol would only return a subset of these.
| Field Summary | |
|---|---|
static int |
REASON_AUTHENTICATION_FAILED
Indicates that the server has refused registration due to a problem with the authentication (most probably a wrong password). |
static int |
REASON_CLIENT_LIMIT_REACHED_FOR_IP
Indicates that we have too many existing registrations from the local IP address and the server won't allow us to open any more of them. |
static int |
REASON_INTERNAL_ERROR
Indicates that an internal application error has occurred and it resulted in the state transition indicated by this event. |
static int |
REASON_MULTIPLE_LOGINS
Indicates that the same user identifier has logged somewhere else. |
static int |
REASON_NON_EXISTING_USER_ID
Indicates that the server does not recognize the used identifier that we tried to register with. |
static int |
REASON_NOT_SPECIFIED
Indicates that no reason is specified for this event transition. |
static int |
REASON_RECONNECTION_RATE_LIMIT_EXCEEDED
Indicates that we have been disconnecting and reconnecting to the server at a rate that ha become too fast. |
static int |
REASON_SERVER_NOT_FOUND
Indicates that the specified server was not found (i.e. |
static int |
REASON_TLS_REQUIRED
Indicates that the specified server does not support TLS and the has required TLS use. |
static int |
REASON_USER_REQUEST
Indicates that the change in the registration state that has just occurred has been requested by the user. |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
RegistrationStateChangeEvent(ProtocolProviderService source,
RegistrationState oldValue,
RegistrationState newValue,
int reasonCode,
String reason)
Creates an event instance indicating a change of the provider state from oldValue to newValue. |
|
| Method Summary | |
|---|---|
RegistrationState |
getNewState()
Returns the status of the provider after this event took place. |
RegistrationState |
getOldState()
Returns the status of the provider before this event took place. |
ProtocolProviderService |
getProvider()
Returns the provider that has generated this event |
String |
getReason()
Returns a (non localized) String containing information further explaining the reason code, or null if no particular reason has been specified. |
int |
getReasonCode()
One of the REASON_XXX fields, indicating the reason code returned by the server in order to explain the state transition. |
String |
toString()
Returns a string representation of this event. |
| Methods inherited from class java.beans.PropertyChangeEvent |
|---|
getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int REASON_NOT_SPECIFIED
public static final int REASON_USER_REQUEST
public static final int REASON_AUTHENTICATION_FAILED
public static final int REASON_MULTIPLE_LOGINS
public static final int REASON_NON_EXISTING_USER_ID
public static final int REASON_CLIENT_LIMIT_REACHED_FOR_IP
public static final int REASON_RECONNECTION_RATE_LIMIT_EXCEEDED
public static final int REASON_INTERNAL_ERROR
public static final int REASON_SERVER_NOT_FOUND
public static final int REASON_TLS_REQUIRED
| Constructor Detail |
|---|
public RegistrationStateChangeEvent(ProtocolProviderService source,
RegistrationState oldValue,
RegistrationState newValue,
int reasonCode,
String reason)
source - the provider that generated the eventoldValue - the status the source provider was in before entering
the new state.newValue - the status the source provider is currently in.reasonCode - a value corresponding to one of the REASON_XXX fields
of this class, indicating the reason for this state transition.reason - a String further explaining the reason code or null if
no such explanation is necessary.| Method Detail |
|---|
public ProtocolProviderService getProvider()
public RegistrationState getOldState()
public RegistrationState getNewState()
public String toString()
toString in class EventObjectpublic int getReasonCode()
public String getReason()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||