com.ibm.aglet.system
Class Aglets
java.lang.Object
|
+--com.ibm.aglet.system.Aglets
- public abstract class Aglets
- extends java.lang.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:4434";
// 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"));
}
- Version:
- 1.10 $Date: 2001/07/28 06:34:06 $
- Author:
- Mitsuru Oshima
Method Summary |
static AgletProxy |
createAglet(java.lang.String contextAddress,
java.net.URL codebase,
java.lang.String classname,
java.lang.Object init)
Creates an aglet |
static AgletProxy[] |
getAgletProxies(java.lang.String contextAddress)
Gets an enumeration of aglet proxies of all aglets residing
in the context specified by contextAddress. |
static AgletProxy |
getAgletProxy(java.lang.String contextAddress,
AgletID id)
Obtains a proxy reference the remote aglet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Aglets
public Aglets()
createAglet
public static AgletProxy createAglet(java.lang.String contextAddress,
java.net.URL codebase,
java.lang.String classname,
java.lang.Object init)
throws java.io.IOException
- Creates an aglet
getAgletProxies
public static AgletProxy[] getAgletProxies(java.lang.String contextAddress)
throws java.io.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.
getAgletProxy
public static AgletProxy getAgletProxy(java.lang.String contextAddress,
AgletID id)
throws java.io.IOException
- Obtains a proxy reference the remote aglet.