public class PortalConnection extends java.lang.Object implements Connection
NAME| Constructor and Description |
|---|
PortalConnection() |
| 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.
|
public 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
Connectionlogin in interface Connectionlogin - user login namepassword - encrypted user passwordlocale - user localeipAddress - IP addressclientInfo - Client infoLoginException - in case of unsuccesful login due to wrong credentials or other issuespublic void login(java.util.Locale locale,
@Nullable
java.lang.String ipAddress,
@Nullable
java.lang.String clientInfo)
throws LoginException
Connectionlogin in interface Connectionlocale - LocaleipAddress - IP addressclientInfo - Client infoLoginException - in case of unsuccesful login due to wrong credentials or other issuespublic void logout()
Connectionlogout in interface Connectionpublic boolean isConnected()
ConnectionisConnected in interface Connectionpublic PortalSession getSession()
ConnectiongetSession in interface Connectionpublic void update(PortalSession session) throws LoginException
Connectionupdate in interface Connectionsession - new UserSession objectLoginException - in case of unsuccesful updatepublic void addListener(ConnectionListener listener)
ConnectionaddListener in interface Connectionlistener - listener to addpublic void removeListener(ConnectionListener listener)
ConnectionremoveListener in interface Connectionlistener - listener to remove