|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.remoting.samples.callback.statistics.CallbackServer.SampleInvocationHandler
public static class CallbackServer.SampleInvocationHandler
Simple invocation handler implementation. When callback clients are registered, will generate callbacks periodically.
Constructor Summary | |
---|---|
CallbackServer.SampleInvocationHandler()
|
Method Summary | |
---|---|
void |
acknowledgeCallback(InvokerCallbackHandler callbackHandler,
java.lang.Object callbackId,
java.lang.Object response)
|
void |
addListener(InvokerCallbackHandler callbackHandler)
Adds a callback handler that will listen for callbacks from the server invoker handler. |
java.lang.Object |
invoke(InvocationRequest invocation)
Called by the remoting server to handle the invocation from client. |
void |
removeListener(InvokerCallbackHandler callbackHandler)
Removes the callback handler that was listening for callbacks from the server invoker handler. |
void |
run()
Will generate callback messages every second while shouldGenerateCallbacks flag is true. |
void |
setInvoker(ServerInvoker invoker)
set the invoker that owns this handler |
void |
setMBeanServer(javax.management.MBeanServer server)
set the mbean server that the handler can reference |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.remoting.ServerInvocationHandler |
---|
toString |
Constructor Detail |
---|
public CallbackServer.SampleInvocationHandler()
Method Detail |
---|
public java.lang.Object invoke(InvocationRequest invocation) throws java.lang.Throwable
invoke
in interface ServerInvocationHandler
java.lang.Throwable
public void addListener(InvokerCallbackHandler callbackHandler)
addListener
in interface ServerInvocationHandler
public void removeListener(InvokerCallbackHandler callbackHandler)
removeListener
in interface ServerInvocationHandler
public void run()
run
in interface java.lang.Runnable
public void setMBeanServer(javax.management.MBeanServer server)
ServerInvocationHandler
setMBeanServer
in interface ServerInvocationHandler
public void setInvoker(ServerInvoker invoker)
ServerInvocationHandler
setInvoker
in interface ServerInvocationHandler
public void acknowledgeCallback(InvokerCallbackHandler callbackHandler, java.lang.Object callbackId, java.lang.Object response)
acknowledgeCallback
in interface CallbackListener
callbackHandler
- InvokerCallbackHandler that handled this callbackcallbackId
- id of callback being acknowledgedresponse
- either (1) response sent with acknowledgement or (2) null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |