|
JSR 217 (Maintenance Release) | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.microedition.xlet.ixc.IxcRegistry
IxcRegistry
is the bootstrap mechanism for obtaining
references to remote objects residing in other Xlets executing on
the same machine, but in separate classloaders. The
IxcRegistry
class provides access to a database
of objects exported for the purpose of inter-xlet communication (IXC).
A single database is shared for all IXC clients on a given machine.
Objects stored in the database are identified by a String name of
arbitrary format.
Each IxcRegistry
instance is associated with a
single XletContext
, in order to identify the
IXC client using it.
Instances of IXCRegistry
are never accessible via
java.rmi.Naming
or
java.rmi.registry.LocateRegistry
if RMI functionality
is implemented.
Registry
,
getRegistry(javax.microedition.xlet.XletContext)
Field Summary |
Fields inherited from interface java.rmi.registry.Registry |
REGISTRY_PORT |
Constructor Summary | |
protected |
IxcRegistry()
Creates the IxcRegistry. |
Method Summary | |
abstract void |
bind(String name,
Remote obj)
Binds the specified name to a remote object. |
static IxcRegistry |
getRegistry(XletContext context)
Provides the inter-Xlet communication registry for use by the calling Xlet. |
abstract String[] |
list()
Returns an array of the names bound in the registry. |
abstract Remote |
lookup(String name)
Returns a reference, a stub, for the remote object associated with the specified name . |
abstract void |
rebind(String name,
Remote obj)
Rebinds the specified name to a new remote object. |
abstract void |
unbind(String name)
Destroys the binding for the specified name that is associated with a remote object. |
abstract void |
unbindAll()
Removes the bindings for all remote objects currently exported by the calling Xlet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected IxcRegistry()
getRegistry(javax.microedition.xlet.XletContext)
Method Detail |
public static IxcRegistry getRegistry(XletContext context)
context
- The context of the Xlet requesting the registry.
NullPointerException
- If context
or
context.getClassLoader()
is null
.public abstract Remote lookup(String name) throws StubException, NotBoundException
name
.
First, if there is a security manager, its
checkPermission
method is called with the permission
IxcPermission(name, "lookup")
.
lookup
in interface Registry
name
- the name of the remote object
NotBoundException
- If name is not currently bound
StubException
- If a stub could not be generated.
SecurityException
- If the caller does not have the permission
IxcPermission(name, "lookup")
IxcPermission
public abstract void bind(String name, Remote obj) throws StubException, AlreadyBoundException
name
to a remote object.
First, if there is a security manager, its
checkPermission
method is called with the permission
IxcPermission(name, "bind")
.
A pre-check is performed on the Remote object to
verify that it conforms to the rules for well-formed Remote
interfaces; if it does not, a StubException
is
thrown.
bind
in interface Registry
name
- the name of the remote objectobj
- a reference for the remote object (usually a stub)
AlreadyBoundException
- if name is already bound
StubException
- If a stub could not be generated.
SecurityException
- If the caller does not have the permission
IxcPermission(name, "bind")
IxcPermission
public abstract void unbind(String name) throws NotBoundException, AccessException
First, if there is a security manager, its
checkPermission
method is called with the permission
IxcPermission(name, "bind")
.
However, names bound to objects exported by the calling xlet are
exempted from this permission check. In other words, xlets are always
allowed to unbind objects they have currently exported.
unbind
in interface Registry
name
- the name of the remote object
SecurityException
- If name is not bound to an object exported
by the calling xlet and the caller does not have the permission
IxcPermission(name, "bind")
.
NotBoundException
- If name is not currently bound.
AccessException
- If name
is bound to an
object exported in a different registry.IxcPermission
public abstract void unbindAll()
public abstract void rebind(String name, Remote obj) throws StubException, AccessException
First, if there is a security manager, its
checkPermission
method is called with the permission
IxcPermission(name, "bind")
.
A pre-check is performed on the Remote object to
verify that it conforms to the rules for well-formed Remote
interfaces; if it does not, a StubException
is
thrown.
rebind
in interface Registry
name
- the name of the remote objectobj
- new remote object to associate with the name
StubException
- If a stub could not be generated.
AccessException
- If name
is bound to an
object exported in a different registry.
SecurityException
- If the caller does not have the permission
IxcPermission(name, "bind"). In such an event, the remote
object remains bound as before.IxcPermission
public abstract String[] list()
IxcPermission(name, "lookup")
.
list
in interface Registry
IxcPermission
|
JSR 217 (Maintenance Release) | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |