|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkaos.core.util.MethodCallRequestHandler
kaos.core.csi.request.ActionMethodRequestHandler
public abstract class ActionMethodRequestHandler
This class implements the operations to receive and process requests for actions. The operations to receive/process requests are defined in the HashMapRequestReceiver and AIDRequestReceiver. In the case of HashMapRequestReceiver, all requests are received in the form of a String containing the request name, a Hashtable, containing request properties and their values, and in some cases, a callback. In the case of AIDRequestReceiver, requests are received in the form of ActionInstanceDescription. Before a request is executed, a permission is checked to make sure that the request (action) is allowed. Requests are executed using the reflection mechanism. Request name is the name of the method to be invoked; properties and callbakc (if present) are the method's arguments.
| Field Summary | |
|---|---|
protected PolicyChecking |
_policyService
|
| Fields inherited from class kaos.core.util.MethodCallRequestHandler |
|---|
_agentDescription, _helper, _logger, _mts, _nickName, DEFAULT_NICKNAME, myLocator, myMessageReceiver, myMessageSender |
| Constructor Summary | |
|---|---|
ActionMethodRequestHandler()
|
|
| Method Summary | |
|---|---|
protected void |
bindToPolicyService(java.lang.String transportName)
|
protected void |
checkPermissionForAction(java.lang.String actionName,
java.util.HashMap properties)
|
protected java.lang.Object |
executeHashMapBasedAction(java.lang.String actionName,
java.util.HashMap properties,
kaos.core.service.ontology.request.ActionStatusCallback statusCallback)
|
java.util.HashMap |
getPropertiesFromAID(ActionInstanceDescription aid)
|
java.lang.Object |
processAIDRequest(ActionInstanceDescription aid)
This method accepts a request described in an ActionInstanceDescription to perform an action. |
void |
processAIDRequest(ActionInstanceDescription aid,
kaos.core.service.ontology.request.ActionStatusCallback statusCallback)
This method accepts a request described by an ActionInstanceDescription to perform an action. |
java.lang.Object |
processHashMapRequest(java.lang.String actionName)
This method accepts a request described by the given String containing action name. |
void |
processHashMapRequest(java.lang.String actionName,
kaos.core.service.ontology.request.ActionStatusCallback statusCallback)
This method accepts a request described by the given String containing the action name. |
java.lang.Object |
processHashMapRequest(java.lang.String actionName,
java.util.HashMap properties)
This method accepts a request described by the given String and HashMap of properties. |
void |
processHashMapRequest(java.lang.String actionName,
java.util.HashMap properties,
kaos.core.service.ontology.request.ActionStatusCallback statusCallback)
This method accepts a request described by the given String and HashMap of properties. |
| Methods inherited from class kaos.core.util.MethodCallRequestHandler |
|---|
bindToTransport, handleMsgContent, handleObjContent, initialize, receiveMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PolicyChecking _policyService
| Constructor Detail |
|---|
public ActionMethodRequestHandler()
| Method Detail |
|---|
public void processHashMapRequest(java.lang.String actionName,
java.util.HashMap properties,
kaos.core.service.ontology.request.ActionStatusCallback statusCallback)
throws ActionFailureException
processHashMapRequest in interface HashMapRequestReceiveractionName - is a String representing the name of the action as defined in the associated ontology.properties - is an HashMap of ontological Strings representing the desired properties of the action and the associated values.statusCallback - ActionStatusCallback to be called to pass back to the action requestor information about progression of the action execution and the final result.
ActionFailureException - containing the reason for failure. See ontology to determine specific reasons available for a given action
public void processHashMapRequest(java.lang.String actionName,
kaos.core.service.ontology.request.ActionStatusCallback statusCallback)
throws ActionFailureException
processHashMapRequest in interface HashMapRequestReceiveractionName - is a String representing the name of the action as defined in the associated ontology.statusCallback - ActionStatusCallback to be called to pass back to the action requestor information about progression of the action execution and the final result.
ActionFailureException - containing the reason for failure. See ontology to determine specific reasons available for a given action
public java.lang.Object processHashMapRequest(java.lang.String actionName,
java.util.HashMap properties)
throws ActionFailureException
processHashMapRequest in interface HashMapRequestReceiveractionName - is a String representing the name of the action as defined in the associated ontology.properties - is an HashMap of ontological Strings representing the desired properties of the action and the associated values.
ActionFailureException - containing the reason for failure. See ontology to determine specific reasons available for a given action
public java.lang.Object processHashMapRequest(java.lang.String actionName)
throws ActionFailureException
processHashMapRequest in interface HashMapRequestReceiveractionName - is a String representing the name of the action as defined in the associated ontology.
ActionFailureException - containing the reason for failure. See ontology to determine specific reasons available for a given action
public void processAIDRequest(ActionInstanceDescription aid,
kaos.core.service.ontology.request.ActionStatusCallback statusCallback)
throws ActionFailureException
processAIDRequest in interface AIDRequestReceiveraid - is an ActionInstanceDescription that describes the action. It includes the action name and all action properties and their values.statusCallback - ActionStatusCallback to be called to pass back to the action requestor information about progression of the action execution and the final result.
ActionFailureException - containing the reason for failure. See ontology to determine specific reasons available for a given action
public java.lang.Object processAIDRequest(ActionInstanceDescription aid)
throws ActionFailureException
processAIDRequest in interface AIDRequestReceiveraid - is an ActionInstanceDescription that describes the action. It includes the action name and all action properties and their values.
ActionFailureException - containing the reason for failure. See ontology to determine specific reasons available for a given action
protected void bindToPolicyService(java.lang.String transportName)
throws java.lang.Exception
java.lang.Exception
protected java.lang.Object executeHashMapBasedAction(java.lang.String actionName,
java.util.HashMap properties,
kaos.core.service.ontology.request.ActionStatusCallback statusCallback)
throws java.lang.Exception
java.lang.Exception
protected void checkPermissionForAction(java.lang.String actionName,
java.util.HashMap properties)
throws ActionFailureException
ActionFailureExceptionpublic java.util.HashMap getPropertiesFromAID(ActionInstanceDescription aid)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||