RMI specification (5)

zhaozj2021-02-11  189

RMI specification - Chapter 5

The server interface java.rmi.server package contains interfaces and classes commonly used to implement remote objects.

Topic: RemoteObject Class RemoteServer Class UNICASTREMOTEOBJECT class unreferenced interface RMISecurityManager class RMICLASLOADER TOADERHANDLER interface RMI socket factory RMIFAILUREHANDLER interface logStream class stub and skeleton compiler

5.1 RemoteObject Class Java.rmi.Server.RemoteObject implements the java.lang.object behavior in the remote object. Implementation Methods HashCode and Equals will allow remote object references to store remote objects in the hash table. If the two Remote objects reference the same remote object, the return value of the method Equals is True. It is responsible for comparing remote object references for remote objects.

Method toString returns a string that describes the remote object. The content and syntax of the string are related to implementation and variable.

Other methods in java.lang.object retain their original implementation.

package java.rmi.server; public abstract class RemoteObject implements java.rmi.Remote, java.io.Serializable {protected transient RemoteRef ref; protected RemoteObject (); protected RemoteObject (RemoteRef ref); public RemoteRef getRef (); public static Remote Tostub (java.rmi.remote obj) throws java.rmi.nosuchobjectException; public int hashcode (); public boolean equals (object obj); public string toString ();

Because RemoteObject is an abstract class, it cannot be instantiated. Therefore, the constructor of RemoteObject must be called from the subclass implementation. The first RemoteObject constructor will create RemoteObject with an empty remote reference. The second RemoteObject constructor will create RemoteObject that belts REF with a deficity of the definition.

Method GetRef returns a remote reference of the remote object.

Method TOSTUB returns a STUB of remote object OBJ and transmits it as a parameter. This operation is only valid only after it has exported the remote object implementation. If you can't find Stub's stub, this method throws NosuchObjectException.

5.1.1 RemoteObject Class Object Method Java.lang.Object Class For Method Equals, HashCode, and Tostring's default implementation is not available for remote objects. Therefore, the RemoteObject class provides these methods more suitable for remote objects in semantics.

Equals and HashCode methods To use the primary key in the hash table, we must override the Equals and HashCode methods in the remote object implementation, which is overwritten by class java.rmi.server.RemoteObject:

The java.rmi.server.RemoteObject class implements the equals method determines whether the references of the two objects are equal, not whether the contents of the two objects are equal. This is because it is necessary to determine if the content is equal.

Remote method calls, and Equals' signing does not allow throwing distant exceptions. The HashCode method implemented by the java.rmi.server.RemoteObject class (because reference to the same object is considered equal).

The toString method The toString method is defined as a string that returns a remote reference to the object. The content of the content of the string is specified. The currently implemented an object identifier (such as a host name and port number) of the object identifier (such as host name and port number) related to the single object identifier (such as host name and port number) related to the transport layer.

The Clone method can only be replicated with the default mechanism of Java language when the object supports java.lang.cloneable interface. The stub of the remote object generated by the RMIC compiler will be declared as the final, and the cloneable interface is not implemented, so the Stub cannot be copied.

5.1.2 Serialized Form RemoteObject Class implements a special (private) method WriteObject and method ReadObject, which are serially serialized by the object serialization mechanism to process serialized data from java.io.objectOutputStream. RemoteObject serialized form written by the following methods: private void writeObject (java.io.ObjectOutputStream out) throws java.io.IOException, java.lang.ClassNotFoundException; RemoteObject if the remote reference field ref is null, then the method throws Java.rmi.marshalexception. If the remote reference REF is non-empty: REF class is obtained by calling its getRefClass method, the method usually returns a non-package full name of the remote reference class. If the returned class name is non-empty: REF's class name will be written in the UTF format.

Method WriteExternal, the passing parameter is the stream OUT, so that the REF can write its external representation to the stream.

If the class name returned by Ref.getRefClass is empty: write a UTF format in the stream OUT.

The REF is serialized to the stream OUT (ie using WriteObject). When serialization recovery, the status of RemoteObject will be reconstructed by the ObjectInputStream calling this method to use its serialization:

Private void readObject (java.io.objectInputstream in) throws java.io.ioException, java.lang.classNotFoundException

First, the REF's class name (UTF string) is read from the stream in. If the class name is empty string: The object is read from the stream, and then the REF is initialized to this object (ie, by calling in.readObject) if the class name is non-empty: REF's full class name is string Java.rmi The value of .server.Remoteref.PackagePrefix is ​​connected to the class name read from the stream. Create an instance of the REF class (using the above full class name). This new instance (becoming a REF field) reads its external form from the stream in.

2 RemoteServer class java.rmi.server.RemoteServer class is the server implementation class java.rmi.server.UnicastRemoteObject and java.rmi.activation.actiVatable general superclars.

Package java.rmi.server; Public Abstract Class RemoteServer Extends RemoteObject {

protected remoteserver (); protected remote (RemoteRef Ref);

Public static string getClientHost () throws serverNotactiveException; public static void setlog (java.io.outputstream out); public static java.io.PrintStream getLog ();

Because RemoteServer is an abstract class, it will not be instantiated. Therefore, the constructor of a RemoteServer must be called from the subclass implementation. The first RemoteServer constructor will create RemoteServer with an empty remote reference. The second RemoteServer constructor will create RemoteServer with a de-reference refer to REF.

The GetClientHost method allows an activity method to determine which host is initialized by the remote method of the current thread. If there is no remote method in the current thread, throw an exception serverNot ActiveException. SetLog Method records the RMI call to the specified output stream. If the output stream is empty, close the call log. The getLog method returns the RMI call log stream so that the application-specific information is written in the call log.

5.3 UnicastRemoteObject Class Class Java.rmi.Server.UnicastRemoteObject supports creation and exporting a remote object. The remote server objects implemented by this class have the following features:

References to this object are valid only within the process of creating the remote object. Communication with remote objects via TCP. Call, parameters, and results communicate between clients and servers using flow protocols. Package Java.rmi.server; Public Class UnicastRemoteObject Extends RemoteServer {

protected UnicastRemoteObject () throws java.rmi.RemoteException; protected UnicastRemoteObject (int port) throws java.rmi.RemoteException; protected UnicastRemoteObject (int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws java.rmi.RemoteException; public Object clone () throws java .lang.CloneNotSupportedException; public static RemoteStub exportObject (java.rmi.Remote obj) throws java.rmi.RemoteException; public static Remote exportObject (java.rmi.Remote obj, int port) throws java.rmi.RemoteException; public static Remote exportObject (remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws java.rmi.RemoteException; public static boolean unexportObject (java.rmi.Remote obj, boolean force) throws java.rmi.NoSuchObjectException;} 5.3.1 configured new remote object Remote object implementation (implementation of one or more remote interfaces) must be created and exported. Export a remote object allows objects to accept calls from the client. As a remote object exported by UnicastRemoteObject, its export involves listening to the TCP port (note that multiple remote objects can accept the arrival of the same port, so there is no need to listen over the new port). Remote object implementation can extend class UnicastRemoteObject to export the constructor of the object, or extend other classes (or do not expand) and export objects through the unicastRemoteObject method.

The parametric constructor will create a remote object and export on an anonymous (or arbitrary) port, and this will be selected during operation. The second form of constructor belt a single parameter (ie Port), which specifies the port number of the call to the call to accept. The remote object created by the third constructor accepted the call accepted by RMISERVERSOCKETFACTORY; the client established a connection with the remote object by the Socket provided by RMICLIENTSOCKETFACTORY.

5.3.2 Export is not intended to be extended by RemoteObject (any form) available to export simple peer remote objects that are not implemented by extended UnicastREMoteObject classes. The first form of ExportObject method with a single parameter (ie OBJ), which is a remote object that is accepted by the RMI call; the ExportObject method exports the remote object on anonymous (or arbitrary) port, which will be selected at runtime. The second form of ExportObject method is two parameters, which are remote objects OBJ and Port. Port is the port number that the remote object accepts the call. The third ExportObject method uses the specified RMICLIENTSOCKETFACTORY, CSF, and RMISERVERSOCKETFACTORY, SSF exports object OBJ on the specified port. Before passing the RMI call as a parameter or return value, the object must be exported, otherwise it will throw java.rmi.server.stubNotFoundException when trying to pass the "unidentified" object as a parameter or return value to a remote call. After the export, the object can be incorporated into the RMI call as a parameter, or the result of the RMI call is returned. EXPORTOBJECT method Returns Remote STUB. It is the Stub object of the remote object, which will replace the remote object into the RMI call. 5.3.3 Deliver UnicastRemoteObject in the RMI Call As described above, the object will be replaced by the STUB of the remote object when the object of the type UnicastRemoteObject is incoming the RMI call as a parameter or return value. Remote object implementation is reserved in a virtual machine that creates it and does not remove (including its value). In other words, the remote object is incorporated into the RMI call by reference; the remote object implementation cannot be passed through the value.

5.3.4 Serialization UNICASTREMOTEOBJECT If the object of the UnicastRemoteObject type is written to the user-defined ObjectOutputStream For example, the object is written to the serialized file), then the information contained therein will be transient and not saved. However, if the object is a UNICASTREMOTEOBJECT subclass example, it can save non-transitory data and can be saved when serialized.

When UNICASTREMOTEOBJECT is read from ObjectInputStream, it will automatically export to RMI runtime to receive RMI calls. If the export fails due to some reason, the serialized recovery object process will be terminated while throwing an exception.

5.3.5 Reverse UnicastRemoteObject UNEXPORTOBJECT method makes the remote object OBJ unacceptable calls. If the forced parameter is true, the remote object will still be enforced out even if there is a tolerance call or the current call to the remote object. If the forced parameter is false, the object is only reversed only when there is no pending call to the object and the current call. If the object is successfully directed, the object will be removed from the internal table. Reverse objects in this mandatory manner may result in an expiration remote reference of the client holds the remote object. If the remote object is not exported to the RMI runtime, the method will throw an exception java.rmi.nosuchobjectException.

5.3.6 Clone methods Only objects that support the Java.lang.cloneable interface can be replicated using the default mechanism for Java language. Class Java.rmi.Server.UnicastRemoteObject does not implement the interface, but it implements the Clone method to make the remote object can be customized correctly when the subclass needs to implement Cloneable. The Clone method can be used by subclasses to create remote objects of the same copy of the initial content. However, it can be derived to receive remote calls and vary from the original object. 5.4 unreferenced interface package java.rmi.server; public interface unreferenced {public void unreference ();

Java.rmi.server.unReferenced Interface Allows the server object notification, telling it that there is no client to remotely reference it. Distributed garbage collection mechanism will maintain a holder for each remote object

Customer virtual machine collection of procedures. As long as a client holds a remote reference of the remote object, the RMI is saved to save the local reference of the remote object. When the "reference" collection is empty,

UNREFERENCED.UNREFERENCED method (if the server implements the unreferenced interface). Remote objects do not need to support unreferenced interfaces. As long as there is a local reference to the remote object, it can pass or return to the client in the remote call. Receiving the reference process will be added to the reference collection of the remote object. When the reference collection is empty, the unreferenced method of the remote object is called. In this way, the unreferenced method can make multiple calls (each time the collection is empty). The remote object is collected when there is no longer a reference (a reference to the client holding).

5.5 RMISecurityManager class package java.rmi;

Public class rmisecuritymanager extends java.lang.securityManager {public rmisecurityManager (); public synchronized void checkckageAccess (String Pkg) THROWS RMISECURITYXCEPTION;}

RMISecurityManager provides the same security features as Java.lang.securityManager, but it covers the CheckPackageApass method.

In the RMI application, if the security manager is not set, STUB and classes can only be loaded from the local path. This ensures that the application is not infringed by the code downloaded by the remote method.

5.6 RMICLASSLOADER Java.rmi.Server.miclassLoader class provides a common static method for supporting network-based type load based on network-based classes in RMI. These methods are called by the internal grouping stream of RMI to implement dynamic classes of RMI parameters and return value types. However, in order to simulate the RMI's class loading behavior, it can also be called directly by the application. The RMICLASSLOADER class does not have a construction function that can be accessed, so it is not instantiated.

Package java.rmi.server;

public class RMIClassLoader {public static String getClassAnnotation (Class cl); public static Object getSecurityContext (ClassLoader loader); public static Class loadClass (String name) throws java.net.MalformedURLException, ClassNotFoundException; public static Class loadClass (String codebase, String name) throws java.net.MalformedURLException, ClassNotFoundException; public static Class loadClass (URL codebase, String name) throws java.net.MalformedURLException, ClassNotFoundException;} getClassAnnotation method will return a String, String that represents the network codebase path, this path download remote endpoints Specify the definition of the class. The String object returned by the method is used as an annotation of the type descriptor using the String object returned by the method when the RMI is running. The format of the CodeBase string is the CodeBase URL string path defined by the space. The returned CodeBase string will depend on the class loader that provides the class:

If the class loader is one of the following: "System Class Loader" (used to load the class specified in the application "Class Path" and returned from the method ClassLoader.getsystemClassLoader), the parent of the "System Class Loader" Class, such as class loaders for installation methods, null values ​​(used to load "self-intended loaders") of the virtual machine class), and return the value of the java.rmi.server.codebase property. The return value is NULL if the property is not set. Otherwise, if the class loader is an instance of class java.net.urlclassLoader, the returned CodeBase string is a list of URLs in an external form of space, which is loaded by the call class.

The getURLS method on the device returns. If the URLClassLoader creates a call to serve a RMICLASSLOADER.LOADCLASS method when running by the RMI, you can get the relevant CodeBase string without any license. If it is an arbitrary URLClassLoader instance, the calling program must have permissions to connect all the URLs in the CodeBase path, call OpenConnection () on each URL instance returned by the getURLS method. GetPermission () to determine the permission. Finally, if the class loader is not an instance of the URLClassLoader, the java.rmi.server.codebase property value is returned, and NULL is returned if the attribute value is not set. Because the GetSecurityContext method is no longer applicable to the JDK1.2 security model, it is not encouraged to use it; it is used for JDK1.1, used to implement a security check based on class loader. If specified

The class loader is created by the RMI runtime to serve the call to serve a RMICLASSLOADER.LOADCLASS method, then return the first URL in the class loader CodeBase path; otherwise returns NULL.

All three loadClass methods are attempted to load the internal URLClassLoader using the specified name to load classes and load internal URLClassLoader with a specified name and load internal to a specific CodeBase path when feature security manager: LoadClass with a parameter (class name). Method implicitly uses the java.rmi.server.codebase property value as the CodeBase path. We do not encourage the use of the LoadClass method because we no longer encourage the use of java.rmi.server.codebase properties. Users should use the following more versions. LoadClass method with string codebase parameters uses it as a CodeBase path; the CodeBase string must be the same URL list in which the space interval and the getClassanNotation method returned. LoadClass method with java.net.url codebase parameters uses a single URL as CodeBase. For all LoadClass methods, the CodeBase path will be used with the context-based loader of the current thread (by calling getContextClassLoader on the current thread) to determine the internal class loader instance of the class. The RMI runtime will maintain an internal class loader instance table, as the CodeBase path of the parent class loader and the loader (a ordered URL list) as the key value. The LoadClass method queries the URLClassLoader instance in the table with the desired CodeBase path and the context loader of the current thread. If there is no this loader, you will create one and add it to the table. Finally, the loadClass method will be called with the specified class Name on the selected class loader.

If you have a security manager (System.GetSecurityManager does not return null), the loadclass call program must have permissions to connect to all URLs in the CodeBase path. Otherwise it will throw an exception ClassNotFoundException. To prevent untrusted code from being loaded into a Java virtual machine without a security manager, all loadClass methods should ignore specific CodeBase paths without setting the security manager, and only load the current thread context-based loader Specify the class of Name in the middle.

5.7 LoaderHandler interface package java.rmi.server;

Public interface loaderhandler {

Class loadClass (String name) throws MalformedURLException, ClassNotFoundException; Class loadClass (URL codebase, String name) throws MalformedURLException, ClassNotFoundException; Object getSecurityContext (ClassLoader loader);}

-------------------------------------------------- ------------ Note - JDK1.2 does not encourage the loaderhandler interface. -------------------------------------------------- ------------ The LoaderHandler interface is implemented only by the internal RMI of JDK1.1.

5.8 RMI Socket Factory When the RMI runtime requires an instance of java.net.socket and java.net.Net.Net.Net.Serversocket to connect, it is not directly instantigating the objects of these classes, but is in the current RMisocketFactory object (this object) The Createsocket and CreateServersocket methods are returned by static methods RMISOCKETFACTORY.GETSOCKETFACTORY. This will enable the application to define the socket type used by the RMI transmission, such as the subclass of Java.Net.Socket and Java.Net.Serversocket classes. The RMISOCKETFACTORY examples used can be set once by trusted system code. In JDK 1.1, this customization is limited to a relatively global decision of the socket type because the parameters supplied to the factory method are only hosts and ports (for createSocket) and port numbers (for CREATSERVERSOCKET). In JDK 1.2, we introduced new interface RMISERVERSOCKETFAACTORY and RMICLIENTSocketFactory, which can be more flexible to customize protocols used with remote object communication.

To make the application using RMI can use these new socket factory interfaces, we add several new constructors and ExportObject methods in UnicastRemoteObject and Java.rmi.ActiVation.Activatable, which uses clients and server sockets. The factory is an additional parameter.

Remote objects exported by new constructors or ExportObject methods (with RMICLIENTSOCKETFACTORY and RMITSOCKETFACTFACTORY) will be taken by RMI runtime. During this life period of this remote object, running RMISERVERSOCKETFAACTORY to accept calls to accept calls to remote objects, simultaneous use of custom RMICLIENTSocketFactory to connect to clients and remote objects.

RemoteRef and ServerRef implemented by remote objects exported by custom socket factories are UnicastRef2 and UnicastServerRef2. The UnicastRef2 type line representation contains a representation of contact "endpoint" different from the UnicastRef type (only a hostname string in a UTF format, and is represented by a integer port number). For UnicastRef2, the line represents the line representation of a format byte to specify the remainder of the endpoint (allowed future expansion), followed by the specified format. Currently, these data can include host names, port numbers, and optional (specified by endpoint format bytes) RMICLIENTSOCKETFACTORY object serialization representation. It can be used by a client to generate a socket connection to a remote object at that endpoint. The endpoint represents the RMISerVersocketFactory object specified when the remote object is exported.

When the CreateSocket method is used, the CreateSocket method of the RMICLIENTSOCKETFAACTORY object is used when creating a socket connection through the UnicastRef2 type. Similarly, when the DGC "Dirty" and "Clean" calls are performed at runtime, it must call the DGC on the remote virtual machine, and the method is generated using the same RMICLIENTSOCKETFACTORY object specified in the remote reference. The server-side DGC implementation should be responsible for the verification result. If the remote object is exported by the old constructor or UnicastRemoteObject, the remote set factory is exported as a parameter, and it has the previously unicastref and unicastserverref type Remoteref and ServerRef, and its endpoint will also use the vintage line. That is, a host string in a UTF format follows an integer of a specified port number. Such a RMI server that does not use JDK 1.2 new features can interoperate with the old RMI client.

5.8.1 RMisocketFactory class java.rmi.server.rmisocketFactory Abstract class provides an interface to specify how to get a socket in the transfer. Note, the following class uses the Socket and Serversocket in the java.net package.

Package Java.rmi.Server; Public Abstract Class RmisocketFactory Implements RpacelientSocketFactory, RMISERVERSOCKETFAACTORY {

public abstract Socket createSocket (String host, int port) throws IOException; public abstract ServerSocket createServerSocket (int port) throws IOException; public static void setSocketFactory (RMISocketFactory fac) throws IOException; public static RMISocketFactory getSocketFactory (); public static void setFailureHandler (RMIFailureHandler fh Public static rmifailurehandler getfailurehandler ();

Static Method SetsocketFactory can be used to set up a socket factory, while RMI will get a socket from it. The application can only call this method once with its own instance RMisocketFactory. For example, the application-defined RMisocketFactory implements some basic filtration and throw an exception on the required connection, or returns its extension to java.net.socket or java.net.serversocket classes (for example, providing expansion of security channels) . Note that RMisocketFactory can only be set when the current security manager allows the setup factory to be set. If this setting is not allowed, SECURITY Exception will be thrown.

Static method GetSocketFactory returns a socket factory used by RMI. If the socket factory is not set, the return value is NULL.

When the transmission needs to create a socket, the transport layer will call the Createsocket and CreateServersocket methods to RMISOCK ETFActory returned by the GetSocketFactory method. E.g:

RmisocketFactory.getsocketFactory (). CreateSocket (MyHost, myport) method createSocket should create a client set to the specified Host and Port. The C ReateServersocket method should create a server socket on the specified port.

The default RMisocketFactory Transfer implementation uses HTTP to provide transparent RMI through the firewall, as described below:

In Createsocket, the factory will automatically attempt to establish an HTTP connection with a host that cannot contact with a socket. In CreateSerVersocket, the factory will return server sockets for automatically detecting whether the newly accepted connection is an HTT P POST request. If so, returns only a socket that is only transparently displayed to the transfer to the transmission, and the output is formatted as an HTTP response. Method SetFailureHandler Sets the failure handle. When creating a server socket failure, the handle will be called by the RMI runtime. This handle returns a Boolean value for indicating whether it should be retryed. The default failure handle return value is false, which means that you will no longer try to create a socket when it is runtime.

Method GetFailureHandler returns the current handle when the socket creation fails. The failure handle will be NULL when it is not set.

5.8.2 The RMISERVERSOCKETFACTORY interface provides a RMISE RVERSOCKETFACTORY instance to support custom communications with remote objects. This can be done by the corresponding UnicastRemoteObject constructor or the ExportObject method, or by the corresponding java.rmi.activation.activat Aable constructor or the exportObject method. If the server socket is associated with it when exporting a remote object, the RMI runs the server socket factory using the remote object to create a SE RVERSERSERSERSERVERSOTFAACTORY.CREATSERVERSERVERSOCKET method to connect to a remote client.

Package java.rmi.server; public interface rmiserversocketfactory {

Public Java.Net.Serversocket CreateServersocket (INT Port) THROWS IOException;

5.8.3 RMICLIENTSOCKETFACTORY Interface To customize communication with the remote object, the remote object can specify an instance of RMICLIENTSOCK ETFACTORY when exporting. This can be done both through the corresponding UNICASTREMOTEOBJECT constructor or the ExportObject method, or through the corresponding java.rmi.activation.activatable constructor or the ExportObject method. If the client sleeve texture is associated with the remote object, the client sets will be downloaded to a remote virtual machine with a reference to the remote object. Subsequently, the RMI running will use the RMICLIENTSOCKETFACTORY.CREATESOCKET method to establish a connection from the client to the remote object.

Package java.rmi.server; public interface rmiclientsocketFactory {public java.net.socket createsocket (String host, int port) throws ooException

5.9 RMIFAILUREHANDLER Interface Java.rmi.Server.RmifailureHandler interface provides a way to specify how the server socket is specified when the RMI runtime responds (unless the object is exporting). Package java.rmi.server;

Public interface rmifailurehandler {public boolean failure (Exception ex);

The Failure method will be called when an exception is created when the RMI is created. If you try to try again, the method returns value true; otherwise it will return false.

Before calling this method, you need to register the failure segment by calling the RMisocketFactory.setFailureHandler. If the handle is not set, the RMI is waiting for a while to try again after trying to create a ServerSock ET.

Note that if the ServerSocket fails when the SERVERSOCKET fails, RMIFAILUREHANDAL will not be called. When Serversocket accepts the request to fail, Create the Serve RSocket, then call RMIFAILUREHANDALER.

5.10 Logstream class logStream provides a mechanism for recording errors. People who monitor the system may be interested in these errors. This class is used inside for log server calls.

Package java.rmi.server;

public class LogStream extends java.io.PrintStream {public static LogStream log (String name); public static synchronized PrintStream getDefaultStream (); public static synchronized void setDefaultStream (PrintStream newDefault); public synchronized OutputStream getOutputStream (); public synchronized void setOutputStream (OutputStream OUT; Public Void Write (INT B); Public Void Write (Byte B [], INT OFF, INT LEN; public string toString (); public static int parselavel (string s); // log level constant public static final INT Silent = 0; public static final int brief = 10; public static final int verbose = 20;}

-------------------------------------------------- ---------------------------- Note -JDK1.2 does not encourage logstream class --------- -------------------------------------------------- ----------------------

The method log returns the logStream that is identified by a given name. If the log corresponding to a name does not exist, create a log that uses the default stream.

Methods GetDefaultStream returns the current default stream for the new log.

Method SetDefaultStream Sets the default stream for the new log.

Method GetputStream returns the stream output to the current log.

Method SetOutputStream Sets the output stream of the log.

The first form of method WRITE will write one byte data. If it is not a new line, the byte will be added to the internal buffer. If it is a new line, the rows in the current buffer will be sent to the log's output stream. The second form of method WRITE will write a write anniode array. Method TOSTRING returns a log name in a string.

Method Parsevel converts the character string name of the log level to internal integer representation.

5.11 Stub and Skeleton Compiler RMIC's Stub and Skeleton compilers are used to compile the corresponding Stub and Skeleton for specific remote objects. The compiler will call a full name of the class of the remote object class. This class must be compiled successfully before.

The location of the introduction class is specified by the environment variable classpath or parameter -classpath. Compiling class files will be placed in the current directory unless specified parameter -D, otherwise compiling class files will be placed in the current directory. Parameters - KeepGenerated (or -keep) Reserves the generated Java source file for Stub and Skeleton. You can also specify the version of the Stub Protocol: - -v1.1 Create a STUB / SKELETON--VCompat (JDK 1.2 is default) Create a STUB / SKELETON that is compatible with the JDK 1.1 and 1.2 Stub Protocol version. - -v1.2 Create stub (note, no SKELETON) only in accordance with JDK 1.2 Stub Protocol version

-show option Displays a graphical user interface. Most javac command line parameters can be used (except) and can be used with RMIC: - -g Generate debugging information - -depend repeated compile expired file - -NowarNo does not generate a warning message - -verbose outputs the compiler Action message - -classpath Specifies the location of the search input source and class files - -d specifies the location of the generated class file - -j Passage to the Java interpreter

转载请注明原文地址:https://www.9cbs.com/read-4731.html

New Post(0)