interface
The interface is used to implemnt client-side Tunnel server for callback support.
It uses CallbackServer to get asynchronous requests.
Then it delegates requests to instance of Invocator that perform a requests.
The interface also has methods to control thread that handles polling.
- See Also:
HttpCallbackClient
,
CallbackServer
,
Invocator
Method Summary |
void |
call(java.lang.Object arg)
Passes request for method call to Invocator |
java.lang.Object |
createCallbackProxy(java.lang.String methodName,
java.lang.Object listener)
Creates callback proxy |
CallbackServer |
getCallbackServer()
Returns proxy to CallbackServer. |
Invocator |
getInvocator()
Returns Invocator. |
boolean |
isRunning()
Checks if thread that performs polling is running. |
void |
start()
Starts the thread that performs polling of CallbackServer
located on Tunneling server. |
void |
stop()
Stops the thread that performs polling of CallbackServer remote object. |
getInvocator
public Invocator getInvocator()
- Returns Invocator.
The instance of Invocator is used to perform requests.
createCallbackProxy
public java.lang.Object createCallbackProxy(java.lang.String methodName,
java.lang.Object listener)
throws TunnelException
- Creates callback proxy
- Parameters:
methodName
- method for which proxy has to be createdlistener
- the listener for the callback
start
public void start()
- Starts the thread that performs polling of CallbackServer
located on Tunneling server.
isRunning
public boolean isRunning()
- Checks if thread that performs polling is running.
stop
public void stop()
- Stops the thread that performs polling of CallbackServer remote object.
It just sets stop flag and returns.
You have to check isRunning flag to be sure if thread is stopped.
call
public void call(java.lang.Object arg)
- Passes request for method call to Invocator
- Parameters:
arg
- the argument passed to Invocator
getCallbackServer
public CallbackServer getCallbackServer()
- Returns proxy to CallbackServer.
Copyright © JProxy LLC. All Rights Reserved.