|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.rmix.spi.AbstractInvoker
edu.emory.mathcs.rmix.spi.AbstractAsyncInvoker
Convenience base class for RMIX providers to implement
AsyncInvoker.
The asynchronous invocation modes are implemented by mapping them onto synchronous calls using a thread pool.
| Nested Class Summary | |
static interface |
AbstractAsyncInvoker.Call
|
static interface |
AbstractAsyncInvoker.PremarshalledCall
|
| Field Summary |
| Fields inherited from class edu.emory.mathcs.rmix.spi.AbstractInvoker |
interfaces, ref |
| Constructor Summary | |
protected |
AbstractAsyncInvoker(Executor engine,
RemoteRef ref,
java.lang.ClassLoader cloader,
boolean resolveAll,
BasicAsyncBindParams bindParams)
|
| Method Summary | |
protected java.lang.Object |
doInvoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
|
Parameters |
getBindParameters()
Retrieves parameters associated with this invoker. |
java.lang.Object |
getParameter(java.lang.String name)
Gets the value of the provider-specific parameter with a given name. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method m,
java.lang.Object[] params)
Performs the remote method invocation. |
Rmix.Future |
invokeAsync(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
Serializes calls on this stub from same client thread. |
Rmix.Future |
invokeCbAsync(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params,
Callback cb)
Serializes calls on this stub from same client thread |
void |
invokeOneWay(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
Schedules the one-way remote method invocation that offers no indication of completion. |
protected abstract AbstractAsyncInvoker.Call |
prepareCall(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
Returns object encapsulating a synchronous remote call. |
protected abstract AbstractAsyncInvoker.PremarshalledCall |
preparePremarshalledCall(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
Returns object encapsulating a synchronous, premarshalled remote call. |
void |
setParameter(java.lang.String name,
java.lang.Object value)
Sets the value of the provider-specific parameter given by name. |
| Methods inherited from class edu.emory.mathcs.rmix.spi.AbstractInvoker |
equals, getInterfaces, getRef, hashCode |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.emory.mathcs.rmix.Invoker |
getInterfaces, getRef |
| Constructor Detail |
protected AbstractAsyncInvoker(Executor engine,
RemoteRef ref,
java.lang.ClassLoader cloader,
boolean resolveAll,
BasicAsyncBindParams bindParams)
throws java.lang.ClassNotFoundException
| Method Detail |
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method m,
java.lang.Object[] params)
throws java.lang.Exception
Invoker
invoke in interface Invokerinvoke in class AbstractInvokerjava.lang.Exception
protected java.lang.Object doInvoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
public Rmix.Future invokeAsync(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
throws java.rmi.RemoteException
invokeAsync in interface AsyncInvokerproxy - the client-side proxy that originated the invocation.method - the remote method to invoke.params - invocation parameters.
java.rmi.RemoteException - if the call could not be performed.
public void invokeOneWay(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
throws java.rmi.RemoteException
AsyncInvokerparams are marshalled or copied before
returning, so that subsequent changes to the state of
params do not affect the invocation that may be still
in progress.
The requested method must belong to one of the interfaces available
through Invoker.getInterfaces().
invokeOneWay in interface AsyncInvokerproxy - the client-side proxy that originated the invocation.method - the remote method to invoke.params - invocation parameters.
java.rmi.RemoteException - if the call could not be performed.
public Rmix.Future invokeCbAsync(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params,
Callback cb)
throws java.rmi.RemoteException
invokeCbAsync in interface AsyncInvokerproxy - the client-side proxy that originated the invocation.method - the remote method to invoke.params - invocation parameters.cb - the callback to receive notification once the call
completes.
java.rmi.RemoteException - if the call could not be performed.
protected abstract AbstractAsyncInvoker.Call prepareCall(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
throws java.rmi.RemoteException
proxy - the proxy on which the method has been invokedmethod - the method to be invokedparams - method parameters
java.rmi.RemoteException
protected abstract AbstractAsyncInvoker.PremarshalledCall preparePremarshalledCall(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] params)
throws java.rmi.RemoteException
pipe to minimize memory
overhead.
proxy - the proxy on which the method has been invokedmethod - the method to be invokedparams - method parameters
java.rmi.RemoteExceptionpublic Parameters getBindParameters()
Invokerremote reference using these parameters will
create invoker indistinguishable from this one.
getBindParameters in interface InvokergetBindParameters in class AbstractInvoker
public void setParameter(java.lang.String name,
java.lang.Object value)
Invoker
setParameter in interface InvokersetParameter in class AbstractInvokerInvoker.setParameter(java.lang.String, java.lang.Object)public java.lang.Object getParameter(java.lang.String name)
Invoker
getParameter in interface InvokergetParameter in class AbstractInvokerInvoker.setParameter(java.lang.String, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||