|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.marketcetera.util.ws.stateless.Node
org.marketcetera.util.ws.stateless.StatelessClient
org.marketcetera.util.ws.stateful.Client
public class Client
A client node for stateful communication. Its (optional)
application ID is that of the application which hosts the client. A
session starts with login(String,char[]) and ends with
logout().
| Field Summary |
|---|
| Fields inherited from class org.marketcetera.util.ws.stateless.Node |
|---|
DEFAULT_HOST, DEFAULT_PORT |
| Constructor Summary | |
|---|---|
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,
Class<?>... inContextClasses)
Create a new Client instance. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.marketcetera.util.ws.stateless.StatelessClient |
|---|
fillContext, getAppId, getService |
| Methods inherited from class org.marketcetera.util.ws.stateless.Node |
|---|
getConnectionUrl, getHost, getId, getPort, setHost |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Client(String inHost,
int inPort,
AppId inAppId,
Class<?>... inContextClasses)
inHost - a String valueinPort - an int valueinAppId - an AppId valueinContextClasses - a Class<?>... value
public 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()
| Method Detail |
|---|
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()
StatelessClient
getContext in class StatelessClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||