|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.remoting.Client
Client is a convience method for invoking remote methods for a given subsystem
| Field Summary | |
static int |
MAX_NUM_ONEWAY_THREADS
Indicated the max number of threads used within oneway thread pool. |
| Constructor Summary | |
Client(ClassLoader cl,
ClientInvoker invoker,
String subsystem)
|
|
Client(ClassLoader cl,
InvokerLocator locator,
String subsystem)
|
|
Client(InvokerLocator locator,
String subsystem)
|
|
| Method Summary | |
void |
addListener(InvokerCallbackHandler callbackHandler)
Adds the specified handler as a callback listener for pull (sync) callbacks. |
void |
addListener(InvokerCallbackHandler callbackHandler,
InvokerLocator clientLocator)
Adds the specified handler as a callback listener for push (async) callbacks. |
void |
connect()
|
void |
disconnect()
|
List |
getCallbacks()
|
ClientInvoker |
getInvoker()
|
String |
getSessionId()
|
String |
getSubsystem()
|
Object |
invoke(Object param,
Map sendPayload)
invoke the method remotely |
void |
invokeOneway(Object param,
Map sendPayload)
Same as calling invokeOneway(Object param, Map sendPayload, boolean clientSide) with clientSide param being false. |
void |
invokeOneway(Object param,
Map sendPayload,
boolean clientSide)
Will invoke a oneway call to server without a return object. |
boolean |
isConnected()
|
void |
removeListener(InvokerCallbackHandler callbackHandler)
Removes callback handler as a callback listener from the server (and client in the case that it was setup to receive async callbacks). |
void |
setInvoker(ClientInvoker invoker)
|
void |
setSessionId(String sessionId)
This will set the session id used when making invocations on server invokers. |
void |
setSubsystem(String subsystem)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MAX_NUM_ONEWAY_THREADS
| Constructor Detail |
public Client(InvokerLocator locator,
String subsystem)
throws Exception
public Client(ClassLoader cl,
InvokerLocator locator,
String subsystem)
throws Exception
public Client(ClassLoader cl,
ClientInvoker invoker,
String subsystem)
throws Exception
| Method Detail |
public void setSessionId(String sessionId)
sessionId - public String getSessionId()
public boolean isConnected()
public void connect()
throws Exception
Exceptionpublic void disconnect()
public ClientInvoker getInvoker()
public void setInvoker(ClientInvoker invoker)
public String getSubsystem()
public void setSubsystem(String subsystem)
public Object invoke(Object param,
Map sendPayload)
throws Throwable
param - sendPayload -
Throwable
public void invokeOneway(Object param,
Map sendPayload,
boolean clientSide)
throws Throwable
The second, is to pass false as the clientSide param. This will allow the current calling thread to make the call to the remote server, at which point, the server side processing of the thread will be executed on the remote server in a new executing thread and the client thread will return. This is a little slower, but will know that the call made it to the server.
param - sendPayload - clientSide -
Throwable
public void invokeOneway(Object param,
Map sendPayload)
throws Throwable
param - sendPayload -
Throwable
public void addListener(InvokerCallbackHandler callbackHandler)
throws Throwable
callbackHandler -
Throwable
public void addListener(InvokerCallbackHandler callbackHandler,
InvokerLocator clientLocator)
throws Throwable
callbackHandler - clientLocator -
Throwable
public void removeListener(InvokerCallbackHandler callbackHandler)
throws Throwable
callbackHandler -
Throwable
public List getCallbacks()
throws Throwable
Throwable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||