Java Reference
In-Depth Information
• Obtain an IxcRegistry instance for a specific context by invoking its static
getRegistry method.
• Register an object implementing java.rmi.Remote to a unique name using the
bind method.
• Return an array of String s naming each bound object in the registry using list .
• Call lookup to retrieve a specific Remote object.
• Unregister a specific object using unbind , or unregister all objects registered in the
current XletContext using unbindAll .
• Register a new object implementing java.rmi.Remote to an already registered name
using the rebind method.
Listing 9-8 shows how a prototypical Xlet might offer a remote Location instance to
other Xlets.
Listing 9-8. An Xlet Producing an Object for IXC Consumption
import java.rmi.*;
import javax.microedition.xlet.*;
import javax.microedition.xlet.ixc.*;
public class XletLocationProducer implements Xlet {
private XletContext context;
private Location location;
private static final String NAME =
"XletLocationProducer.Location";
public XletLocationProducer () {
}
public void initXlet( XletContext c )
throws XletStateChangeException {
location = new Location();
context = c;
 
Search WWH ::




Custom Search