All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.agent.services.loader.rmi.NetClassLoader

java.lang.Object
   |
   +----java.lang.ClassLoader
           |
           +----com.sun.jaw.impl.agent.services.loader.rmi.NetClassLoader

public class NetClassLoader
extends ClassLoader
implements LibraryLoaderIf, Externalizable, ActivatableIf
This class provides a simple implementation of a class loader which will load a class from a Class Server based on RMI.

The class loader can be instantiated at start time in the agent or dynamically. Several instances of the NetClassLoader can co-exist within the same agent.

When initializing the class loader, an object name must be assigned to the instance. The object name is used by the class loader for retrieving configuration information. So the following key properties need to be specified in the object name:

See Also:
NetClassServerImpl

Constructor Index

 o NetClassLoader()
Default constructor.
 o NetClassLoader(ObjectName)
Initialize the NetClassLoader service.

Method Index

 o deleteCmf()
Deletes the net class loader.
 o getClassVersion()
Returns the version of this class.
 o getLibPaths()
Returns the current libpath used by the loader for storing native libraries
 o getLoaderName()
Gets the object name of this instance of NetClassLoader.
 o initCmf(Framework, ObjectName, boolean, ModificationList)
Initialize the NetClassLoader service.
 o isActive()
Tests if the NetClassLoader is active.
 o loadClass(String)
 o loadLibrary(String, String)
Loads a dynamic native library.
 o performStart()
Activates the NetClassLoader.
 o performStop()
Deactivates the NetClassLoader.
 o readExternal(ObjectInput)
This method reads the objects contents during Object Serialization.
 o setLibPaths(Vector)
Set library path from where native libraries are loaded
 o writeExternal(ObjectOutput)
This method saves the objects contents during Object Serialization.

Constructors

 o NetClassLoader
 public NetClassLoader()
Default constructor.

 o NetClassLoader
 public NetClassLoader(ObjectName name)
Initialize the NetClassLoader service.

Parameters:
name - Object name containing configuration infotmation.

Methods

 o initCmf
 public void initCmf(Framework cmf,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws InstanceAlreadyExistException
Initialize the NetClassLoader service. The method will declare the object to the Core Management Framework. The name of the class server as well as host/port information are contained in the object name.
For internal use only.

Parameters:
agent - The core management framework to register the service with.
name - Object name containing configuration information.
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.
 o deleteCmf
 public void deleteCmf()
Deletes the net class loader.

 o loadLibrary
 public void loadLibrary(String baseName,
                         String libName) throws SecurityException, UnsatisfiedLinkError
Loads a dynamic native library.

Parameters:
basename - The basename argument is the unique library base name where the library is stored on the management server.
libname - The libname argument is either the full pathname of the library below the library base path or is a simple, architecture-independent library name where the path, prefix, and suffix for the library name are generated based on the appliance type on which the loadLibrary() call was made.
Throws: SecurityException
If the current thread cannot load the specified dynamic library.
Throws: UnsatisfiedLinkError
If the library does not exist.
 o loadClass
 public Class loadClass(String name) throws ClassNotFoundException
Throws: ClassNotFoundException
The specified class could not be found.
Overrides:
loadClass in class ClassLoader
 o performStart
 public synchronized void performStart()
Activates the NetClassLoader.

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

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

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

 o getLoaderName
 public ObjectName getLoaderName()
Gets the object name of this instance of NetClassLoader.

Returns:
The object name of this instance of NetClassLoader.
 o getLibPaths
 public Vector getLibPaths()
Returns the current libpath used by the loader for storing native libraries

 o setLibPaths
 public void setLibPaths(Vector newValue) throws RemoteException
Set library path from where native libraries are loaded

Throws: RemoteException
See java.rmi.RemoteException.
 o writeExternal
 public void writeExternal(ObjectOutput out) throws IOException
This method saves the objects contents during Object Serialization.

Parameters:
out - The serialization output stream.
Throws: IOException
Signals that an I/O exception of some sort has occurred.
 o readExternal
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
This method reads the objects contents during Object Serialization.

Parameters:
in - The serialization input stream.
Throws: IOException
Signals that an I/O exception of some sort has occurred.
Throws: ClassNotFoundException
The class for an object being restored cannot be found.

All Packages  Class Hierarchy  This Package  Previous  Next  Index