java.lang.Object | ||
↳ | sun.rmi.server.UnicastRef | |
↳ | sun.rmi.server.UnicastServerRef |
![]() |
![]() |
UnicastServerRef implements the remote reference layer server-side behavior for remote objects exported with the "UnicastRef" reference type.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callLog | server call log | ||||||||||
logCalls | value of server call log property |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new (empty) Unicast server remote reference.
| |||||||||||
Construct a Unicast server remote reference for a specified
liveRef.
| |||||||||||
Construct a Unicast server remote reference to be exported
on the specified port.
| |||||||||||
Constructs a UnicastServerRef to be exported on an
anonymous port (i.e., 0) and that uses a pregenerated stub class
(NOT a dynamic proxy instance) if 'forceStubUse' is 'true'.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clear the stack trace of the given Throwable by replacing it with
an empty StackTraceElement array, and do the same for all of its
chained causative exceptions.
| |||||||||||
Call to dispatch to the remote object (on the server side).
| |||||||||||
With the addition of support for dynamic proxies as stubs, this
method is obsolete because it returns RemoteStub instead of the more
general Remote.
| |||||||||||
Export this object, create the skeleton and stubs for this
dispatcher.
| |||||||||||
Return the hostname of the current client.
| |||||||||||
Returns the class of the ref type to be serialized.
| |||||||||||
Handle server-side dispatch using the RMI 1.1 stub/skeleton
protocol, given a non-negative operation number that has
already been read from the call stream.
| |||||||||||
Read in external representation for remote ref.
| |||||||||||
Discovers and sets the appropriate skeleton for the impl.
| |||||||||||
Write out external representation for remote ref.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the client remote reference for this remoteRef.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
value of server call log property
Create a new (empty) Unicast server remote reference.
Construct a Unicast server remote reference for a specified liveRef.
Construct a Unicast server remote reference to be exported on the specified port.
Constructs a UnicastServerRef to be exported on an anonymous port (i.e., 0) and that uses a pregenerated stub class (NOT a dynamic proxy instance) if 'forceStubUse' is 'true'. This constructor is only called by the method UnicastRemoteObject.exportObject(Remote) passing 'true' for 'forceStubUse'. The UnicastRemoteObject.exportObject(Remote) method returns RemoteStub, so it must ensure that the stub for the exported object is an instance of a pregenerated stub class that extends RemoteStub (instead of an instance of a dynamic proxy class which is not an instance of RemoteStub).
Clear the stack trace of the given Throwable by replacing it with an empty StackTraceElement array, and do the same for all of its chained causative exceptions.
Call to dispatch to the remote object (on the server side). The up-call to the server and the marshalling of return result (or exception) should be handled before returning from this method.
obj | the target remote object for the call |
---|---|
call | the "remote call" from which operation and method arguments can be obtained. |
IOException | If unable to marshal return result or release input or output streams |
---|
With the addition of support for dynamic proxies as stubs, this method is obsolete because it returns RemoteStub instead of the more general Remote. It should not be called. It sets the 'forceStubUse' flag to true so that the stub for the exported object is forced to be an instance of the pregenerated stub class, which extends RemoteStub. Export this object, create the skeleton and stubs for this dispatcher. Create a stub based on the type of the impl, initialize it with the appropriate remote reference. Create the target defined by the impl, dispatcher (this) and stub. Export that target via the Ref.
impl | the remote object implementation |
---|---|
data | information necessary to export the object |
RemoteException |
---|
Export this object, create the skeleton and stubs for this dispatcher. Create a stub based on the type of the impl, initialize it with the appropriate remote reference. Create the target defined by the impl, dispatcher (this) and stub. Export that target via the Ref.
RemoteException |
---|
Return the hostname of the current client. When called from a thread actively handling a remote method invocation the hostname of the client is returned.
ServerNotActiveException | If called outside of servicing a remote method invocation. |
---|
Returns the class of the ref type to be serialized.
out | the output stream to which the reference will be serialized |
---|
Handle server-side dispatch using the RMI 1.1 stub/skeleton protocol, given a non-negative operation number that has already been read from the call stream.
obj | the target remote object for the call |
---|---|
call | the "remote call" from which operation and method arguments can be obtained. |
op | the operation number |
IOException | if unable to marshal return result or release input or output streams |
---|
Read in external representation for remote ref.
in | the stream to read data from in order to restore the object |
---|
ClassNotFoundException | If the class for an object being restored cannot be found. |
---|---|
IOException |
Discovers and sets the appropriate skeleton for the impl.
RemoteException |
---|
Write out external representation for remote ref.
out | the stream to write the object to |
---|
IOException |
---|
Return the client remote reference for this remoteRef. In the case of a client RemoteRef "this" is the answer. For a server remote reference, a client side one will have to found or created.