|
Generated by JDiff |
||||||||
| PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES | |||||||||
This file contains all the changes in documentation in the packagejava.rmi.serveras colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
AnExportExceptionis aRemoteExceptionthrown if an attempt to export a remote object fails. A remote object is exported via the constructors andexportObjectmethods ofjava.rmi.server.UnicastRemoteObjectandjava.rmi.activation.Activatable. @version 1.9 0210 12/0203/0001 @author Ann Wollrath @since JDK1.1 @see java.rmi.server.UnicastRemoteObject @see java.rmi.activation.Activatable
LoaderHandleris an interface used internally by the RMI runtime in previous implementation versions. It should never be accessed by application code. @version 1.13 0214 12/0203/0001 @author Ann Wollrath @since JDK1.1 @deprecated no replacement
LogStreamprovides a mechanism for logging errors that are of possible interest to those monitoring a system. @version 1.15 0216 12/0203/0001 @author Ann Wollrath (lots of code stolen from Ken Arnold) @since JDK1.1 @deprecated no replacement
AnClass ObjID, constructor ObjID()ObjIDis used to identify a remote object exported to an RMI runtime. When a remoteobjectsobject is exported it is assigned an object identifier either implicitly or explicitly depending on the API used to export.The #ObjID() constructor can be used
uniquely into generate aVMunique object identifier. Such anObjIDis unique over time with respect to the host it is generated on.EachThe #ObjID(int) constructor can be used to create a "well-known" object identifier. The scope of a well-knownObjIDdepends on the RMI runtime it is exported to.An
contains an object number (of typeObjIDinstancelong) and an address space identifierthat(of type I a uniqueObjIDthe address space identifier is unique with respect to aspecificgiven host over time.AnInobjecta well-knownObjIDthe address space identifier isassignedequivalent toaoneremote object when itreturned by invoking theisUID#UID(short)exportedconstructor with the value zero.If the system property
java.rmi.server.randomIDsistrue then the object numberdefined to equal the stringcomponent"true"(64 bitscase insensitive)of an ObjID created withthen theno argument#ObjID() constructor willcontainuse a cryptographically strong random number.@versiongenerator1.22to04/06/00choose the object number of the returnedObjID. @author Ann Wollrath @author Peter Jones @version 1.26 01/12/03 @since JDK1.1
Generates a unique object identifier.Class ObjID, constructor ObjID(int)If the system property
java.rmi.server.randomIDsistrue then the object number componentdefined(64tobits)equalof anthe stringObjID"true"created with(casetheinsensitive)no argumentthen this constructor willcontainuse a cryptographically strong random number.generator to choose the object@sincenumber of theJDK1returnedObjID.1
Class ObjID, boolean equals(Object)GeneratesCreates a "well-known" objectIDidentifier.An
object IDObjIDgeneratedcreated via this constructor will not clash with anyobject IDsObjIDs generated via thedefaultno-arg constructor. @paramnum aobjNum objectuniquenumber for well-known objectnumber @since JDK1.1identifier
Class ObjID, int hashCode()TwoCompares the specified objectidentifierswith thisObjIDfor equality. This method returnstrueare considered equalif and only iftheythe specifiedhaveobject is anObjIDinstance with the samecontentsobject number and address space identifier as this one. @sinceparamJDK1.1obj the object to compare thisObjIDto @returntrueif the given object is equivalent to this one andfalseotherwise
Returns the hash code value forClass ObjID, ObjID read(ObjectInput)thethis objectObjIDidentifier(the object number). @sincereturnJDK1.1the hash code value for this object identifier
ConstructsClass ObjID, String toString()anandobjectreturns aidnewwhoseObjIDcontents isinstance byreadunmarshalling a binary representation fromtheanObjectInputinstance.Specifically this method first
specifiedinvokesinputthe given stream.'s@paramObjectInput#readLong()inmethodinputto read an object number then it invokes UID#read(DataInput) with the stream to read an address space identifier and then it creates and returns a newObjIDinstance that contains the objectIDnumber and address space identifier that were read from the stream. @returnparamobjectin theIDObjectInputinstance to readObjIDfromstream@return unmarshalledObjIDinstance @throws IOException if an I/O erroroccurredoccurs@sincewhileJDK1.1performing this operation
Returns a stringClass ObjID, void write(ObjectOutput)containing the object idrepresentation.The address spaceof this object identifieris included.in@returnthea string representationonly ifofthethis objectid is from a non-local address space. @since JDK1.1identifier
MarshalsClass ObjID, int ACTIVATOR_IDobjecta binary representation ofidthisObjIDtooutputanObjectOutputinstance.Specifically this method first invokes the given stream's ObjectOutput#writeLong(long) method with this object identifier's object number and then it writes its address space identifier by invoking its
UID#write(DataOutput) method with the stream. @param outoutputthestreamObjectOutputinstance to writeobjectthisIDObjIDto @throws IOException if an I/O erroroccurredoccurs@sincewhileJDK1.1performing this operation
object number for well-knownClass ObjID, int DGC_IDidObjIDforof the activator.
object number for well-knownClass ObjID, int REGISTRY_IDidObjIDforof the distributed garbage collector.
object number for well-knownidObjIDforof the registry.
AnOperationcontains a description of a Java method.Operationobjects were used in JDK1.1 version stubs and skeletons. TheOperationclass is not needed for 1.2 style stubs (stubs generated withrmic -v1.2); hence this class is deprecated. @version 1.13 0214 12/0203/0001 @since JDK1.1 @deprecated no replacement
Class RMIClassLoader, String getClassAnnotation(Class)RMIClassLoaderprovidescomprises static methods to support dynamic class loading with RMI. Included are methods for loading classes from a network location (one or more URLs) and obtaining the location from which an existing classcanshould be loaded by remote parties. These methods are used by the RMI runtime when marshalling and unmarshalling classesofcontained inparametersthe arguments and return values of remote method calls and they also may be invoked directly by applications in order to mimic RMI's dynamic class loading behavior.The implementation of the following static methods
is provided by an instance of RMIClassLoaderSpi the service provider interface for those methods. When one of the methods is invoked its behavior is to delegate to a corresponding method on the service provider instance. The details of how each method delegates to the provider instance is described in the documentation for each particular method.
- {@link #loadClass(URL String)}
- {@link #loadClass(String String)}
- {@link #loadClass(String String ClassLoader)}
- {@link #loadProxyClass(String String[] ClassLoader)}
- {@link #getClassLoader(String)}
- {@link #getClassAnnotation(Class)}
The service provider instance is chosen as follows:
. @version 1.
- If the system property
java.rmi.server.RMIClassLoaderSpiis defined then if its value equals the string"default"the provider instance will be the value returned by an invocation of the #getDefaultProviderInstance() method and for any other value if a class named with the value of the property can be loaded by the system class loader (see an that class is assignable to RMIClassLoaderSpi and has a public no-argument constructor then that constructor will be invoked to create the provider instance. If the property is defined but any other of those conditions are not true then an unspecifiedErrorwill be thrown to code that attempts to useRMIClassLoaderindicating the failure to obtain a provider instance.- If a resource named
META-INF/services/java.rmi.server.RMIClassLoaderSpiis visible to the system class loader then the contents of that resource are interpreted as a provider-configuration file and the first class name specified in that file is used as the provider class name. If a class with that name can be loaded by the system class loader and that class is assignable to RMIClassLoaderSpi and has a public no-argument constructor then that constructor will be invoked to create the provider instance. If the resource is found but a provider cannot be instantiated as described then an unspecifiedErrorwill be thrown to code that attempts to useRMIClassLoaderindicating the failure to obtain a provider instance.- Otherwise the provider instance will be the value returned by an invocation of the #getDefaultProviderInstance() method
22 0234 01/0212/0003 @author Ann Wollrath @author Peter Jones @author Laird Dornin @see RMIClassLoaderSpi @since JDK1.1
Returns theClass RMIClassLoader, ClassLoader getClassLoader(String)classannotation string (representingthea location forathe class definition) that RMI will use to annotate thecall streamclass descriptor when marshalling objects of the given class.This method delegates to the RMIClassLoaderSpi#getClassAnnotation(Class) method of the provider instance passing
clas the argument. @param cl the class to obtain the annotation for @return a string to be used to annotate the given class when it gets marshalled ornull@since 1.2
Returns a class loader that loads classes from the given codebase URL path.Class RMIClassLoader, Object getSecurityContext(ClassLoader)The class loader returned is the class loader that the
#loadClass(StringString) method would use to load classesfromfor thegivensamecodebaseargument.IfThis
a class loadermethod delegates towiththe RMIClassLoaderSpi#getClassLoader(String) method of thesameprovider instance passingcodebaseURL pathas thealreadyargument.existsIf
forthere is a security mangerRMIitsruntimecheckPermissionitmethod will bereturned;invokedotherwisewith anewRuntimePermission("getClassLoader")classpermission;loader will bethis could resultcreatedin aSecurityException.If the given codebase isThe provider implementation of thisnullmethod may also performitfurtherreturnssecurity checks to verify that theclasscallingloadercontext hasusedpermission toloadconnectclassesto allviaof the#loadClass(String)URLsmethodin the codebase URL path. @param codebase the list of URLs (space-separated)URLsfrom which thethereturned class loader will load classes from ornull@return a class loader that loads classes from the given codebase URL path @exceptionthrows MalformedURLException ifthecodebaseparamateris non-nulland contains an invalidnon-URL or ifcodebaseisnull and the system propertyjava.rmi.server.codebasecontains an invalid URL @exceptionthrows SecurityException if there is a security manager and the invocation of itscheckPermissionmethod fails or if the caller does not have permission to connect to all of the URLs in the codebase URL path @since 1.3
Returns the security context of the given class loader. @param loader a class loader from which to get the security context @return the security context @Class RMIClassLoader, Class loadClass(String)since JDK1.1 @deprecated no replacement. As of the Java 2 platform v1.2 RMI no longer uses this method to obtain a class loader's security context. @see java.lang.SecurityManager#getSecurityContext()
Loads a class from the codebase URL path specified by theClass RMIClassLoader, Class loadClass(String, String)java.rmi.server.codebaseproperty.This method delegates to String) passing
nullas the first argument andnameas the second argument. @param name the name of the class to load @return theClassobject representing the loaded class @exceptionthrows MalformedURLException if the system propertyjava.rmi.server.codebasecontains an invalid URL @exceptionthrows ClassNotFoundException if a definition for the class could not be found at the codebase location @since JDK1.1 @deprecated replaced byloadClass(String String)method @see #loadClass(String String)
Loads a class from a codebase URL path. Ifthe givencodebaseisnullthen the value of the system propertyClassjava.rmi.server.codebaseobject returnedis usedisas the URL path.equivalentThis method delegates to the Strin ClassLoader)} method of the provider instance passing
Classcodebaseobjectasreturned bythe first argumentas the second argument andRMIClassLoader.loadClass(name)nullas the third argument. @param codebase the list ofspace-URLs (separatedURLsby spaces) to load the class from ornull@param name the name of the class to load @return theClassobject representing the loaded class @exceptionthrows MalformedURLException ifthecodebaseparamateris non-nulland contains an invalidnon-URL or ifcodebaseisnull and the system propertyjava.rmi.server.codebasecontains an invalid URL @exceptionthrows ClassNotFoundException if a definition for the class could not be found at the specified location @since 1.2
AnRMIClientSocketFactoryinstance is used by the RMI runtime in order to obtain client sockets for RMI calls. A remote object can be associated with anRMIClientSocketFactorywhen it is created/exported via the constructors orexportObjectmethods ofjava.rmi.server.UnicastRemoteObjectandjava.rmi.activation.Activatable.An
RMIClientSocketFactoryinstance associated with a remote object will be downloaded to clients when the remote object's reference is transmitted in an RMI call. ThisRMIClientSocketFactorywill be used to create connections to the remote object for remote method calls.An
RMIClientSocketFactoryinstance can also be associated with a remote object registry so that clients can use custom socket communication with a remote object registry.An implementation of this interface should be serializable and should implement Object#equals to return
truewhen passed an instance that represents the same (functionally equivalent) client socket factory andfalseotherwise (and it should also implement Object#hashCode consistently with itsObject.equalsimplementation). @version 1.7 029 12/0203/0001 @author Ann Wollrath @author Peter Jones @since 1.2 @see java.rmi.server.UnicastRemoteObject @see java.rmi.activation.Activatable @see java.rmi.registry.LocateRegistry
AnRMIFailureHandlercan be registered via theRMISocketFactory.setFailureHandlercall. Thefailuremethod of the handler is invoked when the RMI runtime is unable to create aServerSocketto listen for incoming calls. Thefailuremethod returns a boolean indicating whether the runtime should attempt to re-create theServerSocket. @author Ann Wollrath @version @(#)RMIFailureHandler.java 1.8 009 01/0212/0203 @since JDK1.1
AnRMIServerSocketFactoryinstance is used by the RMI runtime in order to obtain server sockets for RMI calls. A remote object can be associated with anRMIServerSocketFactorywhen it is created/exported via the constructors orexportObjectmethods ofjava.rmi.server.UnicastRemoteObjectandjava.rmi.activation.Activatable.An
RMIServerSocketFactoryinstance associated with a remote object is used to obtain theServerSocketused to accept incoming calls from clients.An
RMIServerSocketFactoryinstance can also be associated with a remote object registry so that clients can use custom socket communication with a remote object registry.An implementation of this interface should implement Object#equals to return
truewhen passed an instance that represents the same (functionally equivalent) server socket factory andfalseotherwise (and it should also implement Object#hashCode consistently with itsObject.equalsimplementation). @version 1.7 029 12/0203/0001 @author Ann Wollrath @author Peter Jones @since 1.2 @see java.rmi.server.UnicastRemoteObject @see java.rmi.activation.Activatable @see java.rmi.registry.LocateRegistry
AnRMISocketFactoryinstance is used by the RMI runtime in order to obtain client and server sockets for RMI calls. An application may use thesetSocketFactorymethod to request that the RMI runtime use its socket factory instance instead of the default implementation.The default socket factory implementation used goes through a three-tiered approach to creating client sockets. First a direct socket connection to the remote VM is attempted. If that fails (due to a firewall) the runtime uses HTTP with the explicit port number of the server. If the firewall does not allow this type of communication then HTTP to a cgi-bin script on the server is used to POST the RMI call.
@version 1.
16 0217 12/0203/0001 @author Ann Wollrath @author Peter Jones @since JDK1.1
RemoteCallis an abstraction used solely by the RMI runtime (in conjunction with stubs and skeletons of remote objects) to carry out a call to a remote object. TheRemoteCallinterface is deprecated in the Java 2 platform since it is only used by deprecated methods ofjava.rmi.server.RemoteRef. @version 1.15 0216 12/0203/0001 @since JDK1.1 @author Ann Wollrath @author Roger Riggs @see java.rmi.server.RemoteRef @deprecated no replacement.
TheClass RemoteObject, constructor RemoteObject()RemoteObjectclass implements thejava.lang.Objectbehavior for remote objects.RemoteObjectprovides the remote semantics of Object by implementing methods for hashCode equals and toString. @versionauthor1.22Ann02/02/00Wollrath @authorAnnLairdWollrathDornin @author Peter Jones @version 1.25 01/12/03 @since JDK1.1
Creates a remote object.Class RemoteObject, constructor RemoteObject(RemoteRef)@since JDK1.1
Creates a remote object initialized with the specified remote reference. @param newref remote referenceClass RemoteObject, boolean equals(Object)@since JDK1.1
Compares two remote objects for equality. Returns a boolean that indicates whether this remote object is equivalent to the specified Object. This method is used when a remote object is stored in a hashtable. If the specified Object is not itself an instance of RemoteObject then this method delegates by returning the result of invoking theClass RemoteObject, int hashCode()equalsmethod of its parameter with this remote object as the argument. @param obj the Object to compare with @return true if these Objects are equal; false otherwise. @see java.util.Hashtable@since JDK1.1
Returns a hashcode for a remote object. Two remote object stubs that refer to the same remote object will have the same hash code (in order to support remote objects as keys in hash tables). @see java.util.HashtableClass RemoteObject, String toString()@since JDK1.1
Returns a String that represents the value of this remote object.Class RemoteObject, RemoteRef ref@since JDK1.1
the object's remote reference.
RemoteRefrepresents the handle for a remote object. ARemoteStubuses a remote reference to carry out a remote method invocation to a remote object. @version 1.18 0219 12/0203/0001 @author Ann Wollrath @since JDK1.1 @see java.rmi.server.RemoteStub
TheClass RemoteServer, String getClientHost()RemoteServerclass is the common superclass to server implementations and provides the framework to support a wide range of remote reference semantics. Specifically the functions needed to create and export remote objects (i.e. to make them remotely available) are provided abstractly byRemoteServerand concretely by its subclass(es). @version 1.22 0228 12/0203/0001 @author Ann Wollrath @since JDK1.1
ReturnReturnsthea stringhostnamerepresentation of thecurrentclient.When called from ahost for the remotethreadmethod invocationactively handling a remote methodbeing processed in the currentinvocationthread.the@return ahostnamestring representation of the clientis returned.host @exceptionthrows ServerNotActiveExceptionIfifcalled outside of servicing a remote methodno remote method invocation is being processedinvocation.in@returntheclient hostnamecurrent thread @since JDK1.1
TheRemoteStubclass 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. @version 1.17 0218 12/0203/0001 @author Ann Wollrath @since JDK1.1
AClass ServerCloneException, String getMessage()ServerCloneExceptionis thrown if a remote exception occurs during the cloning of aUnicastRemoteObject.As of release 1.4 this exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The "nested exception" that may be provided at construction time and accessed via the public #detail field is now known as the cause and may be accessed via the Throwable#getCause() method as well as the aforementioned "legacy field." @version 1.
15 0217 12/0203/0001 @author Ann Wollrath @since JDK1.1 @see java.rmi.server.UnicastRemoteObject#clone()
Class ServerCloneException, Exception detailObtainsReturns the detail messageincludeincluding the message from the nested exception if there is one. @return the detail message including nested exception message if any
Nested exception for ServerCloneException.This field predates the general-purpose exception chaining facility. The Throwable#getCause() method is now the preferred means of obtaining this information. @serial @since JDK1.1
AnServerNotActiveExceptionis anExceptionthrown during a call toRemoteServer.getClientHostif the getClientHost method is called outside of servicing a remote method call. @version 1.10 0211 12/0203/0001 @author Roger Riggs @since JDK1.1 @see java.rmi.server.RemoteServer#getClientHost()
A ServerRef represents the server-side handle for a remote object implementation. @version 1.13 0214 12/0203/0001 @author Ann Wollrath @since JDK1.1
TheSkeletoninterface is used solely by the RMI implementation.Every version 1.1 (and version 1.1 compatible skeletons generated in 1.2 using
rmic -vcompat) skeleton class generated by the rmic stub compiler implements this interface. A skeleton for a remote object is a server-side entity that dispatches calls to the actual remote object implementation. @version 1.15 0216 12/0203/0001 @author Ann Wollrath @since JDK1.1 @deprecated no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
This exception is thrown when a call is received that does not match the available skeleton. It indicates either that the remote method names or signatures in this interface have changed or that the stub class used to make the call and the skeleton receiving the call were not generated by the same version of the stub compiler (rmic). @version 1.11 0212 12/0203/0001 @author Roger Riggs @since JDK1.1 @deprecated no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
ASkeletonNotFoundExceptionis thrown if theSkeletoncorresponding to the remote object being exported is not found. Skeletons are not required in the Java 2 platform so this exception is never thrown if stubs are generated withrmic -v1.2. To generate stubs and skeletons compatible with JDK1.1 and the Java 2 SDK usermic -vcompatwhich is the default in the Java 2 SDK. @version 1.11 0212 12/0203/0001 @since JDK1.1 @deprecated no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.
ASocketSecurityExceptionis thrown during remote object export if the code exporting the remote object (either by construction or by explicit call to theexportObjectmethod ofUnicastRemoteObjectorjava.rmi.activation.Activatable) does not have permission to create ajava.net.ServerSocketon the port number specified during remote object export. @version 1.9 0210 12/0203/0001 @author Ann Wollrath @since JDK1.1 @see java.rmi.server.UnicastRemoteObject @see java.rmi.activation.Activatable
Class UID, constructor UID()AbstractionAforUIDcreatingrepresentsidentifiersan identifier thatareis unique over time with respect to the host it is generated on or one of 216 "well-known" identifiers.The #UID() constructor can be used to generate an identifier that is unique over time with respect to
the host it is generated on. The #UID(short) constructor can be used to create one of 216 well-known identifiers.A
UIDinstance contains three primitive values:
uniqueanintthat uniquely identifies the VM that thisUIDwas generated in with respect to its host and at the time represented by thetimevalue (an example implementation of theuniquevalue would be a process identifier) or zero for a well-knownUIDtimealongequal to a time (as returned by a which the VM that thisUIDwas generated in was alive or zero for a well-knownUIDit is generated countashortto distinguishUIDs generated in the same VM with the sametimevalueAn independently generated
UIDinstance is unique over time with respect to the host.@versionon1as long as the host requires more than one millisecond to reboot and its system clock is never set backward.1302/02/00A globally unique identifier can be constructed by pairing aUIDinstance with a unique host identifier such as an IP address. @author Ann Wollrath @author Peter Jones @version 1.19 01/12/03 @since JDK1.1
Class UID, constructor UID(short)CreatesGenerates apure identifierUIDthat is unique over time with respect to the hoston whichthat itiswas generated. This UID is unique under the following conditions: a) the machine takes more than one second to reboot and b) themachine's clock is never set backward. In order to construct a UID that is globally unique simply pair a UID with an InetAddress. @since JDK1on.1
Creates a "well-known"Class UID, boolean equals(Object)IDUID. There are 2^16-1possible suchpossiblewell-known ids.AnA
idUIDgeneratedcreated via this constructor will not clash with anyidUIDs generated via thedefault UIDno-arg constructorwhich will generates a genuinely unique identifier with respect to this host. @param numwell known IDnumber@sinceforJDK1.1well-knownUID
ComparesClass UID, int hashCode()twothe specified object with thisUIDsforcontentequality. This method returnstrueif and only if the specified object is aUIDinstance with the sameuniquetimeandcountvalues as this one. @param obj theObjectobject to comparewiththisUIDto @returntrueifthese Objects arethe given objectequal;isfalseequivalentotherwise.to@seethisjava.util.Hashtableone@sinceandJDK1.1falseotherwise
ReturnsClass UID, UID read(DataInput)a hashcode for thethe hash code valueUID.forTwothisUIDs will have the same hashcode if they are equal with respect to their content. @return thehashcodehash@seecodejava.util.Hashtablevalue@sinceforJDK1.1thisUID
Class UID, String toString()ReadsConstructstheand returns a newUIDinstance by unmarshalling a binary representation fromtheaninputDataInputstreaminstance.@paramSpecifically
inthis method first invokes theinputgiven stream's@returnDataInput#readInt()themethod to read aUIDunique@exceptionvalueIOException ifthen ituidinvoke'scouldthe stream's DataInput#readLong()not bemethod to read atimevalue then it invoke's the stream's DataInput#readShort(due) method to read acountvalue and then it creates and returns a newUIDinstance that contains theuniquetimeandcountvalues that were read from the stream. @paramfailurein theDataInputinstanceor malformedto readUID)from @sincereturnJDK1.1unmarshalledUIDinstance @throws IOException if an I/O error occurs while performing this operation
ReturnsClass UID, void write(DataOutput)thea string representation ofthethisUID. @sincereturnJDK1.1a string representation of thisUID
WriteMarshalsthea binary representation of thisUIDtooutput streamainstance.outDataOutput@paramSpecifically
outthis method first invokes theoutputgiven stream'stoDataOutput#writeInt(int)whichmethodthewith thisUIDis'swrittenunique@exceptionvalueIOException if writingthen it invokes the stream's DataOutput#writeLong(long) method with thisUID'stotimevalue and then it invokes the stream's DataOutput#writeShort(int) method withfailsthisUID'scountvalue. @sinceparamJDK1.1out theDataOutputinstance to write thisUIDto @throws IOException if an I/O error occurs while performing this operation
The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive. The UnicastRemoteObject class provides support for point-to-point active object references (invocations parameters and results) using TCP streams.Class UnicastRemoteObject, constructor UnicastRemoteObject()Objects that require remote behavior should extend RemoteObject typically via UnicastRemoteObject. If UnicastRemoteObject is not extended the implementation class must then assume the responsibility for the correct semantics of the hashCode equals and toString methods inherited from the Object class so that they behave appropriately for remote objects. @version 1.
26 0229 12/0203/0001 @author Ann Wollrath @author Peter Jones @since JDK1.1 @see RemoteServer @see RemoteObject
Class UnicastRemoteObject, constructor UnicastRemoteObject(int)CreateCreates andexportexports a new UnicastRemoteObject object using an anonymous port. @throws RemoteException if failed to export object @since JDK1.1
Class UnicastRemoteObject, constructor UnicastRemoteObject(int, RMIClientSocketFactory, RMIServerSocketFactory)CreateCreates andexportexports a new UnicastRemoteObject object using the particular supplied port. @param port the port number on which the remote object receives calls (ifportis zero an anonymous port is chosen) @throws RemoteException if failed to export object @since 1.2
Class UnicastRemoteObject, RemoteStub exportObject(Remote)CreateCreates andexportexports a new UnicastRemoteObject object using the particular supplied port and socket factories. @param port the port number on which the remote object receives calls (ifportis zero an anonymous port is chosen) @param csf the client-side socket factory for making calls to the remote object @param ssf the server-side socket factory for receiving remote calls @throws RemoteException if failed to export object @since 1.2
Class UnicastRemoteObject, Remote exportObject(Remote, int)ExportExports the remote object to make it available to receive incoming calls using an anonymous port. @param obj the remote object to be exported @return remote object stub @exception RemoteException if export fails @since JDK1.1
Class UnicastRemoteObject, Remote exportObject(Remote, int, RMIClientSocketFactory, RMIServerSocketFactory)ExportExports the remote object to make it available to receive incoming calls using the particular supplied port. @param obj the remote object to be exported @param port the port to export the object on @return remote object stub @exception RemoteException if export fails @since 1.2
Class UnicastRemoteObject, boolean unexportObject(Remote, boolean)ExportExports the remote object to make it available to receive incoming calls using a transport specified by the given socket factory. @param obj the remote object to be exported @param port the port to export the object on @param csf the client-side socket factory for making calls to the remote object @param ssf the server-side socket factory for receiving remote calls @return remote object stub @exception RemoteException if export fails @since 1.2
RemoveRemoves the remote object obj from the RMI runtime. If successful the object can no longer accept incoming RMI calls. If the force parameter is true the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false the object is only unexported if there are no pending or in progress calls to the object. @param obj the remote object to be unexported @param force if true unexports the object even if there are pending or in-progress calls; if false only unexports the object if there are no pending or in-progress calls @return true if operation is successful false otherwise @exception NoSuchObjectException if the remote object is not currently exported @since 1.2
A remote object implementation should implement theUnreferencedinterface to receive notification when there are no more clients that reference that remote object. @version 1.9 0210 12/0203/0001 @author Ann Wollrath @author Roger Riggs @since JDK1.1