JTR 5.0 API Documentation

jtr.remote.cl.impl
Class JtrRmiClassLoaderServerImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by jtr.remote.cl.impl.JtrRmiClassLoaderServerImpl
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, JtrRmiClassLoaderServer

public class JtrRmiClassLoaderServerImpl
extends java.rmi.server.UnicastRemoteObject
implements JtrRmiClassLoaderServer

Default RMI-based implementation of the remote class loader JTR service.

Since:
4.0
Version:
5.0
Author:
frusso
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
JtrRmiClassLoaderServerImpl()
          Creates a new instance of JtrRmiClassLoaderServerImpl
 
Method Summary
 java.lang.Byte[] getBytecode(java.lang.String fqn)
          This method returns a byte array representing the definition of the required class whose fully qualified name has been provided as input parameter.
 java.lang.Byte[] getResource(java.lang.String name)
          This method returns a byte array whose content represents a generic resource loaded from the class-path visible to the current-thread running this code.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JtrRmiClassLoaderServerImpl

public JtrRmiClassLoaderServerImpl()
                            throws java.rmi.RemoteException
Creates a new instance of JtrRmiClassLoaderServerImpl

Throws:
java.rmi.RemoteException
Method Detail

getBytecode

public java.lang.Byte[] getBytecode(java.lang.String fqn)
                             throws java.rmi.RemoteException
This method returns a byte array representing the definition of the required class whose fully qualified name has been provided as input parameter. This method might retunr null just in case the required class could not be found.

Specified by:
getBytecode in interface JtrRmiClassLoaderServer
Parameters:
fqn - The required class' fqn
Returns:
The class' definition or null
Throws:
java.rmi.RemoteException

getResource

public java.lang.Byte[] getResource(java.lang.String name)
                             throws java.rmi.RemoteException
This method returns a byte array whose content represents a generic resource loaded from the class-path visible to the current-thread running this code.

Specified by:
getResource in interface JtrRmiClassLoaderServer
Parameters:
name - The required resource name
Returns:
The byte array of the resource if found, null otherwise
Throws:
java.rmi.RemoteException

The JTR Project is licensed under GPL version 2