|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LoaderManager
The LoaderManager
is used to load Service
implementation classes. This can be used from a remote network host
using RMI as it extends the Remote
interface. Each
Service
that is loaded can be purged from the system
using the unload
method.
Once an object has been loaded into the system it needs to be looked
up in terms of a URI path. This enables links between the service
name and a wildcard pattern to be made. When the pattern is matched
by a URI the resource can be isolated. A service instance can be
linked to several patterns. If the service is to be unlinked the
unlink
method can remove the pattern from the system.
Configuring the links made with the LoaderManager
can
be done using the Loader
. This will ensure that the
changes in the configuration of links with the manager will be
transmitted to the Loader
. This can thus be used as
a means to provide graphical administration of the manager.
Method Summary | |
---|---|
void |
link(java.lang.String pattern,
java.lang.String name)
This is used to link a Service to a wild card
pattern. |
void |
link(java.lang.String pattern,
java.lang.String name,
int pos)
This is used to link a Service to a wild card
pattern. |
void |
load(java.lang.String name,
java.lang.String className)
This loads the class into the system. |
void |
load(java.lang.String name,
java.lang.String className,
java.lang.Object data)
This loads the class into the system. |
void |
load(java.lang.String name,
java.lang.String className,
java.lang.Object[] data)
This loads the class into the system. |
void |
remove(java.lang.String name)
This is used to terminate updates on a Loader
object which has previously registered for updates. |
void |
unlink(Match match)
This is used to unlink a loaded Service that
was linked to the specified match. |
void |
unlink(java.lang.String pattern)
This is used to unlink a loaded Service that
was linked to the specified pattern. |
void |
unload(java.lang.String name)
When an instance has been loaded by the load
method this can be used to purge it from the system and
subsequently remove all links to it. |
void |
update(java.lang.String name,
Loader loader)
This is used to insert a Loader object which
is used to recieve updates on the configuration. |
Method Detail |
---|
void update(java.lang.String name, Loader loader) throws java.rmi.RemoteException
Loader
object which
is used to recieve updates on the configuration. The loader
can be a remote object which enables the local instance to
to communicate its state to a remote administration utility.
Once registered the Loader
will recieve an
immedidate update of the managers layout.
This throws a SecurityException
if the caller
does not have the LoaderPermission
with the
"update" token. This ensures that any Loader
instances from an untrusted codebase cannot register.
loader
- this is the Loader
object that
will recieve updates on state changes
java.lang.SecurityException
- if the caller does not have
the permission to register the Loader
java.rmi.RemoteException
- this is thrown by the RMI systemvoid remove(java.lang.String name) throws java.rmi.RemoteException
Loader
object which has previously registered for updates. If the
Loader
wishes to resume updates it must
register again using the update
method.
This throws a SecurityException
if the caller
does not have the LoaderPermission
with the
"update" token. This ensures that any Loader
instances from an untrusted codebase cannot remove objects
that have registered.
name
- this is the Loader
object that
is terminating updates
java.lang.SecurityException
- if the caller does not have
the permission to register the Loader
java.rmi.RemoteException
- this is thrown by the RMI systemvoid load(java.lang.String name, java.lang.String className) throws java.rmi.RemoteException, LoadingException
Resource
implementation identified by the class name. If the class
can not be loaded ClassNotFoundException
is
thrown. The fully qualified package name must be given.
Once the Service
class has been loaded it is
used to create an instance. This instance can then have
links established to it. The link is created using the
unique name of the instance specified and a wild pattern.
This method requires LoaderPermission
with
the "load" action. If the client does not have permission
to load the service instance this throws an exception.
name
- this is the unique name given to the instanceclassName
- this is the fully qualified class name
LoadingException
- is thrown if the class
cannot be located or loaded
java.rmi.RemoteException
- thrown by the RMI system
java.lang.SecurityException
- if the caller does not have
permission to load the servicevoid load(java.lang.String name, java.lang.String className, java.lang.Object data) throws java.rmi.RemoteException, LoadingException
Resource
implementation identified by the class name. If the class
can not be loaded ClassNotFoundException
is
thrown. The fully qualified package name must be given.
Once the Service
class has been loaded it is
used to create an instance. This instance can then have
links established to it. The link is created using the
unique name of the instance specified and a wild pattern.
This method requires LoaderPermission
with
the "load" action. If the client does not have permission
to load the service instance this throws an exception.
name
- this is the unique name given to the instanceclassName
- this is the fully qualified class namedata
- this is the data used for service preparation
LoadingException
- is thrown if the class
cannot be located or loaded
java.rmi.RemoteException
- thrown by the RMI system
java.lang.SecurityException
- if the caller does not have
permission to load the servicevoid load(java.lang.String name, java.lang.String className, java.lang.Object[] data) throws java.rmi.RemoteException, LoadingException
Resource
implementation identified by the class name. If the class
can not be loaded ClassNotFoundException
is
thrown. The fully qualified package name must be given.
Once the Service
class has been loaded it is
used to create an instance. This instance can then have
links established to it. The link is created using the
unique name of the instance specified and a wild pattern.
This method also allows an object to be issued to the new
service instance for configuration purposes.
This method requires LoaderPermission
with
the "load" action. If the client does not have permission
to load the service instance this throws an exception.
name
- this is the unique name given to the instanceclassName
- this is the fully qualified class namedata
- the configuration object used by the service
LoadingException
- is thrown if the class
cannot be located or loaded
java.rmi.RemoteException
- thrown by the RMI system
java.lang.SecurityException
- if the caller does not have
permission to load the servicevoid unload(java.lang.String name) throws java.rmi.RemoteException
load
method this can be used to purge it from the system and
subsequently remove all links to it. If the class name
specified does not correspond to a Service
that had be previously loaded this will return quietly.
The fully qualified package name must be given.
This method like the load
methods requires
the LoaderPermission
with the "load" action
to unload a named service instance.
name
- this is the name of the service object
java.rmi.RemoteException
- thrown by the RMI system
java.lang.SecurityException
- if the caller does not have
permission to unload the servicevoid link(java.lang.String pattern, java.lang.String name) throws java.rmi.RemoteException
Service
to a wild card
pattern. The Service
can be linked using the
patterns '*' and '?'. This will enable the resource to be
isolated using a string that matches the suggested pattern.
Patterns can take the form of a string with wild characters
embedded in it, for instance "*.html". Also if the class
name does not belong to a previously loaded
Service
this should return quietly.
This throws a SecurityException
if the caller
does not have the LoaderPermission
with the
"link" action. This ensures that any Service
instances loaded from an untrusted codebase cannot change
the configuration settings.
pattern
- this is a wild string used for matchingname
- this is the Service
that will be
identified by the pattern
java.lang.SecurityException
- if the caller does not have
the permission to link the pattern
java.rmi.RemoteException
- this is thrown by the RMI systemvoid link(java.lang.String pattern, java.lang.String name, int pos) throws java.rmi.RemoteException
Service
to a wild card
pattern. The Service
can be linked using the
patterns '*' and '?'. This will enable the resource to be
isolated using a string that matches the suggested pattern.
Patterns can take the form of a string with wild characters
embedded in it, for instance "*.html". Also if the class
name does not belong to a previously loaded
Service
this should return quietly.
This throws a SecurityException
if the caller
does not have the LoaderPermission
with the
"link" action. This ensures that any Service
instances loaded from an untrusted codebase cannot change
the configuration settings.
pattern
- this is a wild string used for matchingname
- this is the Service
that will be
identified by the patternpos
- the position within the list of patterns to add
the new match
java.lang.SecurityException
- if the caller does not have
the permission to link the pattern
java.rmi.RemoteException
- this is thrown by the RMI systemvoid unlink(java.lang.String pattern) throws java.rmi.RemoteException
Service
that
was linked to the specified pattern. If that pattern was
not used to match a Service
then this returns
quietly.
This throws a SecurityException
if the caller
does not have the LoaderPermission
with the
"link" action. This ensures that any Service
instances loaded from an untrusted codebase cannot change
the configuration settings.
pattern
- this is a wild string used for matching
java.lang.SecurityException
- if the caller does not have
the permission to unlink the pattern
java.rmi.RemoteException
- this is thrown by the RMI systemvoid unlink(Match match) throws java.rmi.RemoteException
Service
that
was linked to the specified match. If that pattern was
not used to match a Service
then this returns
quietly.
This throws a SecurityException
if the caller
does not have the LoaderPermission
with the
"link" action. This ensures that any Service
instances loaded from an untrusted codebase cannot change
the configuration settings.
match
- this is the pattern match to remove from this
java.lang.SecurityException
- if the caller does not have
the permission to unlink the match
java.rmi.RemoteException
- this is thrown by the RMI system
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |