|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.ClassLoader | +--java.security.SecureClassLoader | +--com.sun.jaw.impl.agent.services.loader.rmi.NetClassLoader
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:
1099
.NetClassServer
.libpath
property in the object name you give to the service.
jaw.net.library.path
property.
getTmpDir()
in class DefaultPaths.
NetClassServerImpl
, Serialized FormConstructor Summary | |
NetClassLoader()
Allocates a new net class loader. |
|
NetClassLoader(ObjectName name)
Allocates a new net class loader object using name as ObjectName. |
Method Summary | |
void |
deleteCmf()
Deletes the net class loader. |
protected java.lang.Class |
findClass(java.lang.String name)
Returns the Class object associated with the class with the given name from the remote class server. |
protected java.lang.String |
findLibrary(java.lang.String libname)
Returns the absolute path name of a native library. |
static java.lang.String |
getClassVersion()
Returns the version of this class. |
java.util.Vector |
getLibPaths()
Returns the current library path used by the network library loader for storing native libraries locally before loading them into memory. |
ObjectName |
getLoaderName()
Gets the object name of this instance of NetClassLoader . |
void |
initCmf(Framework cmf,
ObjectName name,
boolean db,
ModificationList list)
Initialize the NetClassLoader service. |
boolean |
isActive()
Tests if the NetClassLoader is active. |
void |
performStart()
Activates the NetClassLoader . |
void |
performStop()
Deactivates the NetClassLoader . |
void |
readExternal(java.io.ObjectInput in)
This method reads the objects contents during Object Serialization. |
void |
setLibPaths(java.util.Vector newValue)
Sets the library path used by the network library loader for storing native libraries locally before loading them into memory. |
void |
writeExternal(java.io.ObjectOutput out)
This method saves the objects contents during Object Serialization. |
Methods inherited from class java.security.SecureClassLoader |
defineClass,
getPermissions |
Methods inherited from class java.lang.ClassLoader |
defineClass,
defineClass,
defineClass,
definePackage,
findLoadedClass,
findResource,
findResources,
findSystemClass,
getPackage,
getPackages,
getParent,
getResource,
getResourceAsStream,
getResources,
getSystemClassLoader,
getSystemResource,
getSystemResourceAsStream,
getSystemResources,
loadClass,
loadClass,
resolveClass,
setSigners |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public NetClassLoader()
public NetClassLoader(ObjectName name)
name
contains the information need for the initialization
in its key part.name
- Object name containing configuration information.Method Detail |
public void initCmf(Framework cmf, ObjectName name, boolean db, ModificationList list) throws InstanceAlreadyExistException
For JDMK internal use only.
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.public void deleteCmf()
For JDMK internal use only.
protected java.lang.Class findClass(java.lang.String name) throws java.lang.ClassNotFoundException
name
- the fully qualified name of the desired class.protected java.lang.String findLibrary(java.lang.String libname)
OSName/OSArch/OSVersion/lib/nativelibname
), i.e.
the library stat on Solaris SPARC 5.7 will be searched under the library path specified by the class server as:
If this method returns null
, i.e. the library was not found in the class server associated to this
class loader, the VM searches the library along the path specified as the java.library.path
property.
libname
- The library name.public void performStart()
NetClassLoader
.public void performStop()
NetClassLoader
.public boolean isActive()
NetClassLoader
is active.public static java.lang.String getClassVersion()
public ObjectName getLoaderName()
NetClassLoader
.NetClassLoader
.public java.util.Vector getLibPaths()
public void setLibPaths(java.util.Vector newValue) throws java.rmi.RemoteException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
out
- The serialization output stream.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- The serialization input stream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |