public class Client extends StatelessClient
login(String,char[]) and ends with
logout().DEFAULT_HOST, DEFAULT_PORT| Constructor and Description |
|---|
Client()
Creates a new client node with the default server host name and
port, and no client application ID.
|
Client(AppId appId)
Creates a new client node with the default server host name and
port, and the given client application ID.
|
Client(String host,
int port,
AppId appId)
Creates a new client node with the given server host name,
port, and client application ID.
|
Client(String inHost,
int inPort,
AppId inAppId,
ContextClassProvider inContextClassProvider)
Create a new Client instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertValidSession()
Asserts that an active session is in progress.
|
ClientContext |
getContext()
Returns a client context which the client must supply as an
argument to every remote call made via proxies obtained from
the receiver.
|
SessionId |
getSessionId()
Returns the receiver's session ID.
|
void |
login(String user,
char[] password)
Initiates a new session using the given credentials.
|
void |
logout()
Ends an ongoing session.
|
fillContext, getAppId, getServicepublic Client(String inHost, int inPort, AppId inAppId, ContextClassProvider inContextClassProvider)
inHost - a String valueinPort - an int valueinAppId - an AppId valueinContextClassProvider - a ContextClassProvider valuepublic Client(String host, int port, AppId appId)
host - The host name.port - The port.appId - The application ID, which may be null.public Client(AppId appId)
appId - The application ID, which may be null.public Client()
public SessionId getSessionId()
public void assertValidSession()
throws I18NException
I18NException - Thrown if an active session is not in
progress.public void login(String user, char[] password) throws I18NException, RemoteException
user - The user name.password - The password.I18NException - Thrown if a session is already in
progress.RemoteException - Thrown if the server is unable to
complete the login operation.public void logout()
throws RemoteException
RemoteException - Thrown if the server is unable to
complete the logout operation.public ClientContext getContext()
StatelessClientgetContext in class StatelessClientCopyright © 2015. All Rights Reserved.