|
|||||||||||
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 java.lang.String |
LISTENER_ID_KEY
|
static int |
MAX_NUM_ONEWAY_THREADS
Specifies the default number of work threads in the pool for executing one way invocations on the client. |
static java.lang.String |
RAW
|
Constructor Summary | |
Client(java.lang.ClassLoader cl,
ClientInvoker invoker,
java.lang.String subsystem)
|
|
Client(java.lang.ClassLoader cl,
InvokerLocator locator,
java.lang.String subsystem)
|
|
Client(InvokerLocator locator)
|
|
Client(InvokerLocator locator,
java.lang.String subsystem)
|
Method Summary | |
void |
addConnectionListener(ConnectionListener listener)
Adds a connection listener that will be notified if/when the connection to the server fails while the client is idle (no calls being made). |
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 |
addListener(InvokerCallbackHandler callbackHandler,
InvokerLocator clientLocator,
java.lang.Object callbackHandlerObject)
Adds the specified handler as a callback listener for push (async) callbacks. |
void |
connect()
|
void |
disconnect()
|
java.util.List |
getCallbacks(InvokerCallbackHandler callbackHandler)
Gets the callbacks for specified callback handler. |
ClientInvoker |
getInvoker()
|
int |
getMaxNumberOfThreads()
|
org.jboss.util.threadpool.ThreadPool |
getOnewayThreadPool()
|
java.lang.String |
getSessionId()
|
java.lang.String |
getSubsystem()
|
java.lang.Object |
invoke(java.io.InputStream inputStream,
java.lang.Object param)
Takes an inputstream and wraps a server around. |
java.lang.Object |
invoke(java.lang.Object param)
Invokes the server invoker handler with the payload parameter passed. |
java.lang.Object |
invoke(java.lang.Object param,
java.util.Map metadata)
invoke the method remotely |
void |
invokeOneway(java.lang.Object param,
java.util.Map sendPayload)
Same as calling invokeOneway(Object param, Map sendPayload, boolean clientSide) with clientSide param being false. |
void |
invokeOneway(java.lang.Object param,
java.util.Map sendPayload,
boolean clientSide)
Will invoke a oneway call to server without a return object. |
boolean |
isConnected()
|
boolean |
removeConnectionListener(ConnectionListener listener)
Removes specified connection listener. |
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 |
setMarshaller(Marshaller marshaller)
|
void |
setMaxNumberOfThreads(int numOfThreads)
|
void |
setOnewayThreadPool(org.jboss.util.threadpool.ThreadPool pool)
|
void |
setSessionId(java.lang.String sessionId)
This will set the session id used when making invocations on server invokers. |
void |
setSubsystem(java.lang.String subsystem)
|
void |
setUnMarshaller(UnMarshaller unmarshaller)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LISTENER_ID_KEY
public static final int MAX_NUM_ONEWAY_THREADS
public static final java.lang.String RAW
Constructor Detail |
public Client(InvokerLocator locator) throws java.lang.Exception
public Client(InvokerLocator locator, java.lang.String subsystem) throws java.lang.Exception
public Client(java.lang.ClassLoader cl, InvokerLocator locator, java.lang.String subsystem) throws java.lang.Exception
public Client(java.lang.ClassLoader cl, ClientInvoker invoker, java.lang.String subsystem) throws java.lang.Exception
Method Detail |
public void addConnectionListener(ConnectionListener listener)
listener
- public boolean removeConnectionListener(ConnectionListener listener)
listener
-
public void setSessionId(java.lang.String sessionId)
sessionId
- public java.lang.String getSessionId()
public boolean isConnected()
public void connect() throws java.lang.Exception
java.lang.Exception
public void disconnect()
public ClientInvoker getInvoker()
public void setInvoker(ClientInvoker invoker)
public java.lang.String getSubsystem()
public void setSubsystem(java.lang.String subsystem)
public java.lang.Object invoke(java.lang.Object param) throws java.lang.Throwable
param
-
java.lang.Throwable
public java.lang.Object invoke(java.lang.Object param, java.util.Map metadata) throws java.lang.Throwable
param
- - payload for the server invoker handlermetadata
- - any extra metadata that may be needed by the transport (i.e. GET or POST if using
http invoker) or if need to pass along extra data to the server invoker handler.
java.lang.Throwable
public void invokeOneway(java.lang.Object param, java.util.Map sendPayload, boolean clientSide) throws java.lang.Throwable
param
- sendPayload
- clientSide
-
java.lang.Throwable
public void setMaxNumberOfThreads(int numOfThreads)
public int getMaxNumberOfThreads()
public org.jboss.util.threadpool.ThreadPool getOnewayThreadPool()
public void setOnewayThreadPool(org.jboss.util.threadpool.ThreadPool pool)
public void invokeOneway(java.lang.Object param, java.util.Map sendPayload) throws java.lang.Throwable
param
- sendPayload
-
java.lang.Throwable
public void addListener(InvokerCallbackHandler callbackHandler) throws java.lang.Throwable
callbackHandler
-
java.lang.Throwable
public void addListener(InvokerCallbackHandler callbackHandler, InvokerLocator clientLocator) throws java.lang.Throwable
callbackHandler
- clientLocator
-
java.lang.Throwable
public void addListener(InvokerCallbackHandler callbackHandler, InvokerLocator clientLocator, java.lang.Object callbackHandlerObject) throws java.lang.Throwable
callbackHandler
- interface to call on with callbackclientLocator
- locator for callback server to callback oncallbackHandlerObject
- will be included in the callback object passed upon callback
java.lang.Throwable
public void removeListener(InvokerCallbackHandler callbackHandler) throws java.lang.Throwable
callbackHandler
-
java.lang.Throwable
public java.util.List getCallbacks(InvokerCallbackHandler callbackHandler) throws java.lang.Throwable
callbackHandler
-
java.lang.Throwable
public void setMarshaller(Marshaller marshaller)
public void setUnMarshaller(UnMarshaller unmarshaller)
public java.lang.Object invoke(java.io.InputStream inputStream, java.lang.Object param) throws java.lang.Throwable
inputStream
- param
- invocation payload
java.lang.Throwable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |