public class RemoteStub<T> extends Object implements Remote, Externalizable, ILRMIProxy
RemoteStub
class is the common superclass to client stubs and provides the
framework to support a wide range of remote reference semantics. Stub objects are surrogates
that support exactly the same set of remote interfaces defined by the actual implementation of
the remote object.Constructor and Description |
---|
RemoteStub() |
RemoteStub(T directObjRef,
T dynamicProxy)
Constructor to initialize extended stub-class.
|
Modifier and Type | Method and Description |
---|---|
void |
closeProxy()
Close the underline proxy connection and resources, this proxy will no longer be usable.
|
void |
disable()
Force this stub to be disabled (disconnected from its target)
|
void |
enable()
Removes state of any previously called
ILRMIProxy.disable() |
boolean |
equals(Object obj) |
String |
getConnectionUrl() |
T |
getDynamicProxy() |
long |
getGeneratedTraffic() |
T |
getProxy() |
long |
getReceivedTraffic() |
String |
getRemoteHostAddress() |
String |
getRemoteHostName() |
InetSocketAddress |
getRemoteNetworkAddress() |
long |
getRemoteProcessId() |
PlatformLogicalVersion |
getServicePlatformLogicalVersion() |
StubId |
getStubId() |
int |
hashCode() |
protected static void |
init(Callable initCall)
Initialize the abstract logic of extended stub.
|
boolean |
isClosed() |
boolean |
isCollocated() |
static boolean |
isCollocatedStub(Object obj)
Returns
true if supplied object instance is RemoteStub and collocate
with RemoteStub endpoint. |
boolean |
isDirect() |
boolean |
isRemote() |
static boolean |
isStub(Object obj)
Returns
true if supplied object is RemoteStub . |
void |
overrideMethodsMetadata(Map<String,LRMIMethodMetadata> methodsMetadata)
Overrides the LRMI methods metadata.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public RemoteStub()
public RemoteStub(T directObjRef, T dynamicProxy)
directObjRef
- the direct object reference. To save dynamic-proxy invocation call.dynamicProxy
- the dynamic proxy of this stub.IllegalArgumentException
- dynamicProxy is null
.public T getProxy()
public T getDynamicProxy()
public boolean isDirect()
protected static void init(Callable initCall)
initCall.call()
initCall
- the Callable
interface with abstract init logic within call()
method.public static boolean isStub(Object obj)
true
if supplied object is RemoteStub
.obj
- the object to check.true
if supplied object is RemoteStub
.public boolean isCollocated()
true
if RemoteStub instance is collocated with exported endpoint object
and communication performs via direct endpoint object reference(No network/socket), otherwise
false
if communication performs via socket.public static boolean isCollocatedStub(Object obj)
true
if supplied object instance is RemoteStub
and collocate
with RemoteStub endpoint.obj
- the object instance to check.true
if object embedded stub, otherwise false
.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public PlatformLogicalVersion getServicePlatformLogicalVersion()
getServicePlatformLogicalVersion
in interface ILRMIProxy
public boolean isRemote()
isRemote
in interface ILRMIProxy
public StubId getStubId()
getStubId
in interface ILRMIProxy
public long getGeneratedTraffic()
getGeneratedTraffic
in interface ILRMIProxy
public long getReceivedTraffic()
getReceivedTraffic
in interface ILRMIProxy
public String getConnectionUrl()
getConnectionUrl
in interface ILRMIProxy
public long getRemoteProcessId()
getRemoteProcessId
in interface ILRMIProxy
public String getRemoteHostName()
getRemoteHostName
in interface ILRMIProxy
public String getRemoteHostAddress()
getRemoteHostAddress
in interface ILRMIProxy
public InetSocketAddress getRemoteNetworkAddress()
getRemoteNetworkAddress
in interface ILRMIProxy
public void disable() throws RemoteException
ILRMIProxy
disable
in interface ILRMIProxy
RemoteException
public void enable() throws RemoteException
ILRMIProxy
ILRMIProxy.disable()
enable
in interface ILRMIProxy
RemoteException
public void overrideMethodsMetadata(Map<String,LRMIMethodMetadata> methodsMetadata)
ILRMIProxy
overrideMethodsMetadata
in interface ILRMIProxy
public void closeProxy()
ILRMIProxy
closeProxy
in interface ILRMIProxy
public boolean isClosed()
isClosed
in interface ILRMIProxy
Copyright © GigaSpaces.