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

Fields inherited from class com.jproxy.proxy.ProxyHashtable
hashtable, invocationInterceptorClass
 
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 com.jproxy.proxy.ProxyHashtable
create, get, get, keys, remove, removeAll, updateAllLicenses, updateLicense, values
 
Methods inherited from class com.jproxy.proxy.util.ThreadSupport
isRunning, isStopping, run, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Invocator

public Invocator(Tunnel _tunnel)
Creates instance with properties passed as Hashtable object.
Parameters:
env - hastable of properties
Method Detail

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 obtained
objectId - 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.