HPSearch

cgl.hpsearch.shell.narada
Class NaradaBroker

java.lang.Object
  extended byorg.mozilla.javascript.ScriptableObject
      extended bycgl.hpsearch.shell.narada.NaradaBroker
All Implemented Interfaces:
BrokerInstantiatorServiceConstants, Scriptable, Serializable, SOAPRequestHandler

public class NaradaBroker
extends ScriptableObject
implements SOAPRequestHandler, BrokerInstantiatorServiceConstants

NaradaBroker object to create and manipulate brokers and links
Updated on Mar 07, 2005 - Uses custom SOAP Messages instead of simple AXIS based RPC
Created on Sep 27, 2004

Author:
Harshawardhan Gadgil (hgadgil@grids.ucs.indiana.edu)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
DONTENUM, EMPTY, parent, PERMANENT, prototype, READONLY
 
Fields inherited from interface cgl.hpsearch.services.BrokerInstantiator.BrokerInstantiatorServiceConstants
BrokerIDElement, BROKERSERVICE_RESPONSE, CONNECT_TO, CREATE, DELETE_LINK, DISPOSE, GET_BROKERS, GET_GATEWAY_ADDRESS, GET_LINKS, GET_NODE_ADDRESS
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
NaradaBroker()
           
NaradaBroker(String brokerServiceHost)
           
 
Method Summary
 String getClassName()
           
 String getMetadata()
           
 String[] getSupportedActions()
           
static Scriptable jsConstructor(Context cx, Object[] args, Function ctorObj, boolean inNewExpr)
           
static String jsFunction_connectTo(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Creates a Link to the specifed Broker
static String jsFunction_create(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Creates a Broker using the specified config file
static Scriptable jsFunction_getBrokers(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Gets a list of brokers from this service instance
static Scriptable jsFunction_getLinks(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Gets a list of links from this broker
static boolean jsFunction_killBroker(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Deletes the specified broker
static void jsFunction_removeLink(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Removes the specified link on the broker
static boolean jsFunction_requestGatewayAddress(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Gets a Gateway level address for this broker
static boolean jsFunction_requestNodeAddress(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Gets a Node address for this broker
 void process(HTTPPayload msg)
           
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NaradaBroker

public NaradaBroker()

NaradaBroker

public NaradaBroker(String brokerServiceHost)
Method Detail

getMetadata

public String getMetadata()
Specified by:
getMetadata in interface SOAPRequestHandler

getSupportedActions

public String[] getSupportedActions()
Specified by:
getSupportedActions in interface SOAPRequestHandler

process

public void process(HTTPPayload msg)
Specified by:
process in interface SOAPRequestHandler

jsConstructor

public static Scriptable jsConstructor(Context cx,
                                       Object[] args,
                                       Function ctorObj,
                                       boolean inNewExpr)

getClassName

public String getClassName()
Specified by:
getClassName in interface Scriptable

jsFunction_create

public static String jsFunction_create(Context _cx,
                                       Scriptable _thisObj,
                                       Object[] id,
                                       Function funObj)
Creates a Broker using the specified config file

Returns:
- A handle to the created broker

jsFunction_connectTo

public static String jsFunction_connectTo(Context _cx,
                                          Scriptable _thisObj,
                                          Object[] id,
                                          Function funObj)
Creates a Link to the specifed Broker

Returns:
- A link ID representing the created link

jsFunction_requestNodeAddress

public static boolean jsFunction_requestNodeAddress(Context _cx,
                                                    Scriptable _thisObj,
                                                    Object[] id,
                                                    Function funObj)
Gets a Node address for this broker

Returns:
- True if request was successful, false otherwise

jsFunction_requestGatewayAddress

public static boolean jsFunction_requestGatewayAddress(Context _cx,
                                                       Scriptable _thisObj,
                                                       Object[] id,
                                                       Function funObj)
Gets a Gateway level address for this broker

Returns:
- True if request was successful, false otherwise

jsFunction_getLinks

public static Scriptable jsFunction_getLinks(Context _cx,
                                             Scriptable _thisObj,
                                             Object[] id,
                                             Function funObj)
Gets a list of links from this broker

Returns:
- A list of strings represneting the links for the specified broker

jsFunction_removeLink

public static void jsFunction_removeLink(Context _cx,
                                         Scriptable _thisObj,
                                         Object[] id,
                                         Function funObj)
Removes the specified link on the broker


jsFunction_killBroker

public static boolean jsFunction_killBroker(Context _cx,
                                            Scriptable _thisObj,
                                            Object[] id,
                                            Function funObj)
Deletes the specified broker

Returns:
- True if successful, false otherwise

jsFunction_getBrokers

public static Scriptable jsFunction_getBrokers(Context _cx,
                                               Scriptable _thisObj,
                                               Object[] id,
                                               Function funObj)
Gets a list of brokers from this service instance

Returns:
- A list of strings representing the broker ids

HPSearch

For comments and suggestions please send e-mail to Harshawardhan Gadgil
Last updated: June 9 2006