|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkaos.core.service.util.MethodCallRequestHandler
kaos.core.csi.KAoSActorImpl
kaos.core.csi.request.ObligationRequestReceiverImpl
kaos.core.csi.usecase.policy.ObligationActorForNotificationAction
public class ObligationActorForNotificationAction
This class is an example of an actor, performing obligations for NotificationAction defined by: http://ontology.ihmc.us/Notification/NotificationAction.owl#NotificationAction. To support the functionality of ObligationActorForNotificationAction, the classe has been placed in the following hierarchy: KAoSActorImpl | ObligationRequestReceiverImpl | ObligationActorForNotificationAction Obligation actors are required to implement the kaos.core.csi.request.ObligationRequestReceiver defining the method for receiving and procesing obligations: processObligationRequest(ActionInstanceDescription obligationAID, ActionInstanceDescription triggerAID) The above method is called remotely by the guard as a part of the obligation policy enforcement. ObligationActorForNotificationAction's superclass, ObligationRequestReceiverImpl, implements this method, however, it relies on the subclasses to complete the obligation enforcement. In particular, ObligationRequestReceiverImpl only initiates processing of obligations in its implementation of "processObligationRequest": it accepts the obligation in the form of the ActionInstanceDescription, it retrieves the name of the obligation action and then, to complete obligation enforcement, it calls a method with the action name and the following arguments: obligationActionName(ActionInstanceDescription obligationAID, ActionInstanceDescription triggerAID) In the case of ObligationActorForNotificationAction, the method is: NotificationAction(ActionInstanceDescription obligationAID, ActionInstanceDescription triggerAID) The NotificationAction() method is the starting point to the implementation of NotificationAction enforcement. For messaging, ObligationActorForNotificationAction implements the javax.agent.service.transport.MessageListener, implemented by KAoSActorImpl.
Field Summary | |
---|---|
protected kaos.notification.email.EmailClient |
_emailClient
|
protected kaos.notification.gui.NotifyWnd |
_notifyWnd
|
protected kaos.notification.pager.PagerClient |
_pagerClient
|
protected QueryState |
_queryState
|
protected java.util.Hashtable |
_sentNotifications
|
Fields inherited from class kaos.core.csi.KAoSActorImpl |
---|
_actorDesc, _autoCommit, _lctr, _logger, _preferredTransportName, _propertiesToModify, _registered, _registration, _transports, _transportSupport |
Fields inherited from class kaos.core.service.util.MethodCallRequestHandler |
---|
_methodCallProxy, myAgentDescription, myHelper, myLocator, myMessageReceiver, myMessageSender, myMts, myNickName |
Constructor Summary | |
---|---|
ObligationActorForNotificationAction(java.lang.String[] args)
The command line arguments required to bootstrap an instance of ObligationActorForNotificationAction are: -name NotifyAgent -guid NotifyAgent -transport tcp -domains NotifyDomain The -name keyword is followed by the agent's nickname, NotifyAgent. |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
The command line arguments required to instantiate the ObligationActorForNotificationAction are: -name NotifyAgent -guid NotifyAgent -transport tcp -domains NotifyDomain The -name keyword is followed by the agent's nickname, NotifyAgent - required. |
void |
NotificationAction(ActionInstanceDescription obligationAID,
ActionInstanceDescription triggerAID)
This method is called by the superclass, ObligationRequestReceiverImpl, in order to complete the enforcement of an obligation, which in this case is the NotificationAction. |
void |
start()
In this method, this obligation actor continues its policy- and application-specific instantiation: - specifies ontological type of a NotificationAgent in its KAoSAgentDescription - registers with KAoS - initializes its vars - creates its gui - obtains a reference the CSI Query Service needed to obtain addresses to send notifications via email - initializes the notification modes |
Methods inherited from class kaos.core.csi.request.ObligationRequestReceiverImpl |
---|
processObligationRequest, receiveMessage |
Methods inherited from class kaos.core.csi.KAoSActorImpl |
---|
addCapability, addOntologicalType, addOntologicalType, addProperty, addProperty, addPropertyValue, addTransport, commitPropertyValues, deregisterFromKAoS, equals, getAgentDescription, getCapabilities, getConceptMappingName, getDomainNames, getEntityOntologicalTypeNames, getEntityOntologicalTypes, getGUID, getName, getProperties, getProperty, getPropertyValue, getTransport, getTransports, hashCode, isAutoPropertyValueCommit, isGuarded, isRegistered, logMessage, logMessage, printTransportMessage, registerWithKAoS, registerWithKAoS, removeCapability, removeOntologicalType, removeProperty, removePropertyValue, removeTransport, sendMessage, sendMessage, setAutoPropertyValueCommit, setCapabilities, setConceptMappingName, setGUID, setMyDescription, setName, setOntologicalTypes, setProperties, setPropertyValue, setRegistered |
Methods inherited from class kaos.core.service.util.MethodCallRequestHandler |
---|
bindToTransport, initialize |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected kaos.notification.email.EmailClient _emailClient
protected kaos.notification.pager.PagerClient _pagerClient
protected java.util.Hashtable _sentNotifications
protected kaos.notification.gui.NotifyWnd _notifyWnd
protected QueryState _queryState
Constructor Detail |
---|
public ObligationActorForNotificationAction(java.lang.String[] args) throws java.lang.Exception
args
- - containing the arguments described above.
java.lang.Exception
- if some of the required arguments are missing or KAoS Registration or transport
services are not available.Method Detail |
---|
public void start() throws java.lang.Exception
java.lang.Exception
- if the connection to the Directory Service cannot be established, or
if the registering instance has been already registered in the Directory Service, or
if the QueryState service cannot be obtained.public void NotificationAction(ActionInstanceDescription obligationAID, ActionInstanceDescription triggerAID)
obligationAID
- is an ActionInstanceDescription containing the NotificationAction
and its properties.triggerAID
- is an ActionInstanceDescription containing the trigger action name
and its properties. The trigger action provides more information about the context,
in which the trigger action has occurred.public static void main(java.lang.String[] args)
args
- - described above
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |