public final class RMIHandler
extends java.lang.Object
getRMIHandler(...)
methodModifier and Type | Method and Description |
---|---|
void |
dispose(boolean signalFault)
Dispose this
RMIHandler and frees all the used resources and threads. |
boolean |
equals(java.lang.Object obj) |
java.lang.Exception |
getDispositionException()
Gets the exception that caused this handler to be disposed.
|
long |
getDispositionTime()
Gets the time at which this handler has been disposed.
|
java.net.InetSocketAddress |
getInetSocketAddress()
Gets the address of the remote process (IP address + TCP port)
|
java.lang.Object |
getStub(java.lang.String objectId)
Gets a stub for the specified object identifier representing a remote object
on the remote machine.
|
java.lang.Object |
getStub(java.lang.String objectId,
java.lang.Class<?>... stubInterfaces)
Gets a stub for the specified object identifier respect to the specified
interfaces, representing a remote object on the remote machine.
|
int |
hashCode() |
boolean |
isDisposed()
Gets the disposed status of this peer
|
boolean |
isOwnStub(java.lang.Object stub)
Check if the given object is a stub created by this handler
|
void |
removeOwnStubs(java.lang.Iterable<?> objects)
Removes all the objects that are stubs created by this handler from the
specified iterable object
|
void |
retainOwnStubs(java.lang.Iterable<?> objects)
Removes all the objects that are not stubs created by this handler from the
specified iterable object
|
java.lang.String |
toString() |
public void dispose(boolean signalFault)
RMIHandler
and frees all the used resources and threads.
A call to this method can cause a callback on the RMIFaultHandler
instances attached to the RMIRegistry
associated to this instance
sending them the disposition exception of this handler (See
getDispositionException()
).signalFault
- set to true if this RMIHandler
should send a
signal to the RMIFaultHandler
instances attached
to the RMIRegistry
that created this instancepublic java.net.InetSocketAddress getInetSocketAddress()
InetSocketAddress
containing remote host address and portpublic boolean isOwnStub(java.lang.Object stub)
stub
- the object to checkpublic void removeOwnStubs(java.lang.Iterable<?> objects)
objects
- the iterable object to analyzepublic void retainOwnStubs(java.lang.Iterable<?> objects)
objects
- the iterable object to analyzepublic boolean isDisposed()
public java.lang.Object getStub(java.lang.String objectId) throws java.net.UnknownHostException, java.io.IOException, java.lang.InterruptedException
objectId
- the object identifierjava.net.UnknownHostException
- if the host cannot be resolvedjava.io.IOException
- if an I/O error occursjava.lang.InterruptedException
- if the current thread is iterrupted during
operationpublic java.lang.Object getStub(java.lang.String objectId, java.lang.Class<?>... stubInterfaces)
objectId
- the object identifierstubInterfaces
- the interface whose methods must be stubbed, that is
the interface used to access the remote object
operationspublic long getDispositionTime()
public java.lang.Exception getDispositionException()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object