All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.aglet.system.Aglets

java.lang.Object
   |
   +----com.ibm.aglet.system.Aglets

public abstract class Aglets
extends Object
Aglets class defines a set of convenient functions for a client which has no AgletContext and daemon to receive incoming aglets.
 static public void main(String args[]) {
     Aglets.init();
     String contextAddress = "atp://server.com:434";
     // create from server's local path
     AgletProxy p1 = Aglets.createAglet(contextAddress,
                                        null,
                                        "test.Aglet", null);
     AgletID id = p1.getAgletID();
     // this returns a proxy equivalent to p1.
     AgletProxy p2 = Aglets.getAgletProxy(contextAddress, id);
     p2.sendMessage(new Message("startTrip"));     
 }
 


Constructor Index

 o Aglets()

Method Index

 o createAglet(String, URL, String, Object)
Creates an aglet
 o getAgletProxies(String)
Gets an enumeration of aglet proxies of all aglets residing in the context specified by contextAddress.
 o getAgletProxy(String, AgletID)
Obtains a proxy reference the remote aglet.

Constructors

 o Aglets
 public Aglets()

Methods

 o createAglet
 public static AgletProxy createAglet(String contextAddress,
                                      URL codebase,
                                      String classname,
                                      Object init) throws IOException
Creates an aglet

 o getAgletProxy
 public static AgletProxy getAgletProxy(String contextAddress,
                                        AgletID id) throws IOException
Obtains a proxy reference the remote aglet.

 o getAgletProxies
 public static AgletProxy[] getAgletProxies(String contextAddress) throws IOException
Gets an enumeration of aglet proxies of all aglets residing in the context specified by contextAddress.

Parameters:
contextAddress - specify context URL with a string.

All Packages  Class Hierarchy  This Package  Previous  Next  Index