All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.server.rmi.NetClassServerImpl

java.lang.Object
   |
   +----java.rmi.server.RemoteObject
           |
           +----java.rmi.server.RemoteServer
                   |
                   +----java.rmi.server.UnicastRemoteObject
                           |
                           +----com.sun.jaw.impl.server.rmi.NetClassServerImpl

public class NetClassServerImpl
extends UnicastRemoteObject
implements NetClassServer, ActivatableIf
The NetClassServerImpl class is a basic implementation of a network class and library server based on the Java remote method invocation (RMI) system. This class can be used as a standalone server or included as an m-bean in a Java Dynamic Management agent.

To start the server, type this command:

prompt% java com.sun.jaw.impl.server.rmi.NetClassServerImpl

When starting the server, you have to specify the search paths for locating:

You can specify the following system properties:
DEBUG
Specifies that trace information is printed. See the Debug class definition for more information
.
dirfile
The directive file containing the signer and the certificate to be used for signing the classes in this server.
classpath
The search path for requested Java classes.
libpath
The search path for requested native libraries.
port
The port to be used for RMI access.
service
The RMI service name.
By default the server registers at rmi://localhost:1099/NetClassServer.

If an RMI registry is not running, the server starts one and then registers with it.

The network class and library server works in conjunction with the RMI loader.


Constructor Index

 o NetClassServerImpl()
Required when using the class server as an m-bean in a Java Dynamic Management agent.
 o NetClassServerImpl(String, String, String, int, String)
Required when using the class server as a standalone Java program.

Method Index

 o getClass(String)
Searches for the requested Java class on the management server.
 o getClassPaths()
Returns the class path currently used by the network class and library server.
 o getClassVersion()
Returns the version of this class.
 o getLibPaths()
Returns the library path currently used by the network class and library server.
 o getLibrary(LibraryDefinition)
Returns a LibraryDefinition from the management server for the requested library.
 o getName()
 o getServiceName()
 o initCmf(Framework, ObjectName, boolean, ModificationList)
For JDMK internal use only.
 o isActive()
Tests if the NetClassServerImpl is active.
 o main(String[])
 o performStart()
Activates the NetClassServerImpl.
 o performStop()
Deactivates the NetClassServerImpl.
 o setClassPaths(Vector)
Sets the class path to be used by the network class and library server.
 o setLibPaths(Vector)
Sets the library path to be used by the network class and library server.

Constructors

 o NetClassServerImpl
 public NetClassServerImpl() throws RemoteException
Required when using the class server as an m-bean in a Java Dynamic Management agent.

Throws: RemoteException
See java.rmi.RemoteException.
 o NetClassServerImpl
 public NetClassServerImpl(String service,
                           String paths,
                           String lib,
                           int port,
                           String dirfile) throws RemoteException
Required when using the class server as a standalone Java program.

Throws: RemoteException
See java.rmi.RemoteException.

Methods

 o main
 public static void main(String args[])
 o initCmf
 public void initCmf(Framework cmf,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws InstanceAlreadyExistException, IllegalArgumentException
For JDMK internal use only.

Initializes the NetClassServer service. This method declares the object specified to an instance of the core management framework. The name of the object must contain:

Parameters:
agent - The core management framework to register the service with.
name - Object name.
db - Indicates if persistent storage is required.
list - The modification list to use for setting up parameters.
Throws: InstanceAlreadyExistException
The m-bean is already registered in the repository.
Throws: IllegalArgumentException
One of the arguments passed to the method is illegal or inappropriate.
 o getClass
 public ClassDefinition getClass(String className) throws RemoteException, IOException, ClassNotFoundException
Searches for the requested Java class on the management server. An enumeration of class paths is retrieved from como and each path is searched in turn for the requested class.

Throws: RemoteException
See java.rmi.RemoteException.
Throws: IOException
Signals that an I/O exception of some sort has occurred.
Throws: ClassNotFoundException
The specified class could not be found.
 o getLibrary
 public LibraryDefinition getLibrary(LibraryDefinition libdef) throws RemoteException, IOException, NoSuchLibException
Returns a LibraryDefinition from the management server for the requested library. The library definition contains the actual library bytes as one of its attributes.

Throws: RemoteException
See java.rmi.RemoteException.
Throws: IOException
Signals that an I/O exception of some sort has occurred.
Throws: NoSuchLibException
The specified native library could not be found.
 o performStart
 public synchronized void performStart()
Activates the NetClassServerImpl.

 o performStop
 public synchronized void performStop()
Deactivates the NetClassServerImpl.

 o isActive
 public boolean isActive()
Tests if the NetClassServerImpl is active.

 o getClassVersion
 public String getClassVersion()
Returns the version of this class.

 o getClassPaths
 public Vector getClassPaths() throws RemoteException
Returns the class path currently used by the network class and library server.

Throws: RemoteException
See java.rmi.RemoteException.
 o setClassPaths
 public void setClassPaths(Vector newValue) throws RemoteException
Sets the class path to be used by the network class and library server.

Throws: RemoteException
See java.rmi.RemoteException.
 o getLibPaths
 public Vector getLibPaths() throws RemoteException
Returns the library path currently used by the network class and library server.

Throws: RemoteException
See java.rmi.RemoteException.
 o setLibPaths
 public void setLibPaths(Vector newValue) throws RemoteException
Sets the library path to be used by the network class and library server.

Throws: RemoteException
See java.rmi.RemoteException.
 o getName
 public ObjectName getName()
 o getServiceName
 public String getServiceName()

All Packages  Class Hierarchy  This Package  Previous  Next  Index