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:
- The requested Java classes
- The requested native libraries
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.
-
NetClassServerImpl()
- Required when using the class server as an m-bean in a Java Dynamic Management agent.
-
NetClassServerImpl(String, String, String, int, String)
- Required when using the class server as a standalone Java program.
-
getClass(String)
- Searches for the requested Java class on the management server.
-
getClassPaths()
- Returns the class path currently used by the network class and library server.
-
getClassVersion()
- Returns the version of this class.
-
getLibPaths()
- Returns the library path currently used by the network class and library server.
-
getLibrary(LibraryDefinition)
- Returns a
LibraryDefinition from the management server for
the requested library.
-
getName()
-
-
getServiceName()
-
-
initCmf(Framework, ObjectName, boolean, ModificationList)
- For JDMK internal use only.
-
isActive()
- Tests if the
NetClassServerImpl is active.
-
main(String[])
-
-
performStart()
- Activates the
NetClassServerImpl.
-
performStop()
- Deactivates the
NetClassServerImpl.
-
setClassPaths(Vector)
- Sets the class path to be used by the network class and library server.
-
setLibPaths(Vector)
- Sets the library path to be used by the network class and library server.
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.
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.
main
public static void main(String args[])
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:
- The name of the class server to be used.
- The host name.
- The port number.
- 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.
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.
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.
performStart
public synchronized void performStart()
- Activates the
NetClassServerImpl.
performStop
public synchronized void performStop()
- Deactivates the
NetClassServerImpl.
isActive
public boolean isActive()
- Tests if the
NetClassServerImpl is active.
getClassVersion
public String getClassVersion()
- Returns the version of this class.
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.
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.
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.
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.
getName
public ObjectName getName()
getServiceName
public String getServiceName()
All Packages Class Hierarchy This Package Previous Next Index