Class ConflictingSessionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.lightstreamer.adapters.remote.MetadataException
com.lightstreamer.adapters.remote.CreditsException
com.lightstreamer.adapters.remote.ConflictingSessionException
- All Implemented Interfaces:
Serializable
Thrown by the notifyNewSession method of MetadataProvider
if a User is not enabled to open a new Session but he would be enabled
as soon as another Session were closed. By using this exception,
the ID of the other Session is also supplied.
After receiving this exception, the Server may try to close the specified session and invoke notifyNewSession again.
After receiving this exception, the Server may try to close the specified session and invoke notifyNewSession again.
- See Also:
-
Constructor Summary
ConstructorDescriptionConflictingSessionException
(int clientErrorCode, String msg, String userMsg, String conflictingSessionID) Constructs a ConflictingSessionException with supplied error code and message text that will be forwarded to the Client in case the Server can't solve the issue by closing the conflicting session. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Gets the ID of a Session that can be closed in order to eliminate the problem reported in this exception.Methods inherited from class com.lightstreamer.adapters.remote.CreditsException
getClientErrorCode, getClientErrorMsg
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ConflictingSessionException
public ConflictingSessionException(int clientErrorCode, @Nullable String msg, @Nullable String userMsg, @Nonnull String conflictingSessionID) Constructs a ConflictingSessionException with supplied error code and message text that will be forwarded to the Client in case the Server can't solve the issue by closing the conflicting session. An internal error message text can also be specified.- Parameters:
clientErrorCode
- Error code that can be used to distinguish the kind of problem. It must be a negative integer, or zero to mean an unspecified problem.msg
- The detail message.userMsg
- A detail message to be forwarded to the Client. It can be null, in which case an empty string message will be forwarded. The message is free, but if it is not in simple ASCII or if it is multiline, it might be altered in order to be sent to very old non-TLCP clients.conflictingSessionID
- ID of a Session that can be closed in order to eliminate the reported problem. It must not be null.
-
-
Method Details
-
getConflictingSessionID
Gets the ID of a Session that can be closed in order to eliminate the problem reported in this exception.- Returns:
- the ID of a Session that can be closed in order to eliminate the problem reported in this exception.
-