com.jproxy.proxy
Class Invocator
java.lang.Object
|
+--com.jproxy.proxy.util.ThreadSupport
|
+--com.jproxy.proxy.ProxyHashtable
|
+--com.jproxy.proxy.Invocator
- All Implemented Interfaces:
- java.lang.Runnable, java.io.Serializable
- Direct Known Subclasses:
- CallbackInvocator, StubgenInvocator, SynchronousInvocator
- public abstract class Invocator
- extends ProxyHashtable
The abstract class that is responsible for direct access of remote objects
Invocator objects is located on Tunneling server.
It manages construction of remote objects during which proxy stub is generated.
It also invokes methods on remote objects. If result has remote interface type then
proxy stub is generated.
The class also handles destruction of created objects.
- See Also:
Tunnel
,
com.jproxy.proxy.Data
,
ProxyHashtable
, Serialized Form
Constructor Summary |
Invocator(Tunnel _tunnel)
Creates instance with properties passed as Hashtable object. |
Method Summary |
java.lang.Object |
call(java.lang.Object o)
The method that delegates request for remote object access to proper
method: construct(), destruct(), invoke(), getInstance() |
HashObject |
createHashObject(java.lang.Object object,
java.lang.String[] remoteInterfaces,
long sessionId,
boolean isDynamicProxy)
|
abstract Tunnel |
createTunnel()
|
void |
destroy()
Destroys invocator, release references to all hashed remote objects, stops garbage collector |
java.lang.Object |
invokeAll(java.lang.Object obj)
|
java.lang.Object |
invokeOne(java.lang.Object obj)
|
java.lang.Object |
newProxy(java.lang.String[] interfaceNames,
long objectId,
java.lang.String objectClassName,
boolean isDynamicProxy)
The method for obtaining proxy stub for remote interface. |
abstract java.lang.Object |
newProxy(TunnelInvocationHandler handler,
boolean isDynamicProxy)
The abstruct method for obtaining proxy stub for remote interface. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Invocator
public Invocator(Tunnel _tunnel)
- Creates instance with properties passed as Hashtable object.
- Parameters:
env
- hastable of properties
newProxy
public abstract java.lang.Object newProxy(TunnelInvocationHandler handler,
boolean isDynamicProxy)
throws TunnelException
- The abstruct method for obtaining proxy stub for remote interface.
- Parameters:
handler
- for which stub is requested
newProxy
public java.lang.Object newProxy(java.lang.String[] interfaceNames,
long objectId,
java.lang.String objectClassName,
boolean isDynamicProxy)
throws TunnelException
- The method for obtaining proxy stub for remote interface.
- Parameters:
interfaceName
- Name of remote interface for which stub has to be obtainedobjectId
- unique ID that will be assigned to stub
invokeAll
public java.lang.Object invokeAll(java.lang.Object obj)
throws TunnelException
destroy
public void destroy()
- Destroys invocator, release references to all hashed remote objects, stops garbage collector
invokeOne
public java.lang.Object invokeOne(java.lang.Object obj)
throws TunnelException
call
public java.lang.Object call(java.lang.Object o)
- The method that delegates request for remote object access to proper
method: construct(), destruct(), invoke(), getInstance()
- Parameters:
o
- Data object that is marshalled data sent by client
createHashObject
public HashObject createHashObject(java.lang.Object object,
java.lang.String[] remoteInterfaces,
long sessionId,
boolean isDynamicProxy)
throws TunnelException
createTunnel
public abstract Tunnel createTunnel()
Copyright © JProxy LLC. All Rights Reserved.