public class IxcRegistry extends Object
The organisation ID and the application ID shall each be encoded as a hexadecimal string, as would be accepted by java.lang.Integer.parseInt(String s, 16).
When RMI is used to communicate over a network, stubs generated by a tool like rmic are often required. This is not necessary for inter-xlet communication initiated with IxcRegistry. If such stubs are present, they shall be ignored.
Similarly, network RMI objects often extend the class server.RemoteObject, in order to get appropriate implementations for Object.hashCode(), Object.equals(), and Object.toString(). Overriding Object's implementation of these methods in this way is not necessary for inter-xlet communication initiated with IxcRegistry, although it is not harmful. Note that the class server.RemoteObject is not required in all MHP profiles.
| Modifier and Type | Field and Description |
|---|---|
static int |
GLOBAL
Definition of the scope for bind or rebind - exported object is visible to
any Xlet running within the same MHP terminal subject to requirements of the security model.
|
static int |
PAGE
Definition of the scope for bind or rebind - exported object is only
visible to Xlets within the same DVB-HTML application.
|
static int |
SERVICE
Definition of the scope for bind or rebind - exported object is only
visible to Xlets running within the same service context
|
| Modifier and Type | Method and Description |
|---|---|
static void |
bind(XletContext xc,
String name,
Remote obj)
Exports an object under a given name in the namespace of
an Xlet.
|
static void |
bind(XletContext xc,
String name,
Remote obj,
int scope)
Exports an object under a given name in the namespace of
an Xlet.
|
static String[] |
list(XletContext xc)
Returns an array of string path objects available in the
registry.
|
static Remote |
lookup(XletContext xc,
String path)
Returns a remote object previously exported by an Xlet that
has not been destroyed.
|
static void |
rebind(XletContext xc,
String name,
Remote obj)
Rebind the name to a new object in the context of an Xlet;
replaces any existing binding.
|
static void |
rebind(XletContext xc,
String name,
Remote obj,
int scope)
Rebind the name to a new object in the context of an Xlet;
replaces any existing binding.
|
static void |
unbind(XletContext xc,
String name)
Unbind the name.
|
public static final int SERVICE
public static final int PAGE
public static final int GLOBAL
public static Remote lookup(XletContext xc, String path) throws NotBoundException, RemoteException
The organisation ID and the application ID shall each be encoded as a hexadecimal string, as would be accepted by java.lang.Integer.parseInt(String s, 16). If the caller is not authorized to import a given object due to the security policy, then this API will behave as though the object had not been exported, that is, a NotBoundException shall be thrown.
xc - The context of the current Xlet (that is, the Xlet
importing the object).path - A file pathname-like string identifying the Xlet and the
name of the object to be imported.NotBoundException - If the path is not currently bound.RemoteException - If a remote stub class cannot be generated for
the object being imported.IllegalArgumentException - If the path is not formatted in the syntax given
above.NullPointerException - if path is nullpublic static void bind(XletContext xc, String name, Remote obj) throws AlreadyBoundException
The object shall be made visible to other applications running in the same service context. A call to bind(xc, name, obj) is thus equivalent to a call to bind(xc, name, obj, SERVICE).
xc - The context of the Xlet exporting the object.name - The name identifying the object.obj - The object being exportedAlreadyBoundException - if this Xlet has previously exported an object
under the given name.NullPointerException - if xc, name or obj is nullpublic static void bind(XletContext xc, String name, Remote obj, int scope) throws AlreadyBoundException
xc - The context of the Xlet exporting the object.name - The name identifying the object.obj - The object being exportedscope - The scope to which the object is to be exportedAlreadyBoundException - if this Xlet has previously exported an object
under the given name.NullPointerException - if xc, name or obj is nullpublic static void unbind(XletContext xc, String name) throws NotBoundException
xc - The context of the Xlet that exported the object to
be unbound.name - The name identifying the object.NotBoundException - if this is not currently any object exported by
this Xlet under the given name.NullPointerException - if xc or name is nullpublic static void rebind(XletContext xc, String name, Remote obj)
The object shall be made visible to other applications running in the same service context. A call to rebind(xc, name, obj) is thus equivalent to a call to rebind(xc, name, obj, SERVICE).
xc - The context of the Xlet that exported the object.name - The name identifying the object.obj - The object being exportedNullPointerException - if xc, name or obj is nullpublic static void rebind(XletContext xc, String name, Remote obj, int scope)
Narrowing the scope of the binding (e.g. from GLOBAL to SERVICE) shall have the same effect as a call to unbind for any applications which had references to that object and which were in scope but which are now out of scope.
xc - The context of the Xlet that exported the object.name - The name identifying the object.obj - The object being exportedscope - The scope to which the object is to be exportedNullPointerException - if xc, name or obj is nullpublic static String[] list(XletContext xc)
xc - The context of the current Xlet.lookup(javax.tv.xlet.XletContext,String)Copyright © 2012 code4tv.com. All Rights Reserved.