public interface Connection
extends java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ConnectionListener listener)
Add a connection listener.
|
PortalSession |
getSession()
Get current user session.
|
boolean |
isConnected()
Check if the client is connected to the middleware.
|
void |
login(java.util.Locale locale,
java.lang.String ipAddress,
java.lang.String clientInfo)
Log in to the system with system account.
|
void |
login(java.lang.String login,
java.lang.String password,
java.util.Locale locale,
java.lang.String ipAddress,
java.lang.String clientInfo)
Log in to the system.
|
void |
logout()
Log out of the system.
|
void |
removeListener(ConnectionListener listener)
Remove a connection listener.
|
void |
update(PortalSession session)
Update internal state with the passed user session object.
|
static final java.lang.String NAME
void login(java.lang.String login,
java.lang.String password,
java.util.Locale locale,
@Nullable
java.lang.String ipAddress,
@Nullable
java.lang.String clientInfo)
throws LoginException
login - user login namepassword - encrypted user passwordlocale - user localeipAddress - IP addressclientInfo - Client infoLoginException - in case of unsuccessful login due to wrong credentials or other issuesvoid login(java.util.Locale locale,
@Nullable
java.lang.String ipAddress,
@Nullable
java.lang.String clientInfo)
throws LoginException
locale - LocaleipAddress - IP addressclientInfo - Client infoLoginException - in case of unsuccessful login due to wrong credentials or other issuesvoid logout()
boolean isConnected()
@Nullable PortalSession getSession()
void update(PortalSession session) throws LoginException
session - new UserSession objectLoginException - in case of unsuccessful updatevoid addListener(ConnectionListener listener)
listener - listener to addvoid removeListener(ConnectionListener listener)
listener - listener to remove