|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.core.csi.usecase.SimpleGuardedSender
public class SimpleGuardedSender
$Revision: 1.6 $
Field Summary | |
---|---|
protected kaos.core.service.directory.KAoSAgentDescription |
_agentDescription
This class llustrates an implementation of a SimpleGuardedSender: an entity registered with KAoS via its Guard and capable of sending messages to other entities registered in the KAoS Directory Service. |
protected PolicyChecking |
_policyChecking
|
protected QueryRegistration |
_query
|
protected TransportSupport |
_transportSupport
|
Constructor Summary | |
---|---|
SimpleGuardedSender()
|
Method Summary | |
---|---|
void |
authorizeCommunicationAction(java.lang.String performedBy,
java.lang.String hasDestination,
java.lang.String carriesMessage,
java.lang.String hasPartner,
java.lang.String dsTransportName)
Authorize a communication action described by properties expressed by the arguments to this method. |
boolean |
equals(java.lang.Object obj)
Two agents are equal if their respective hash codes are equal. |
int |
hashCode()
Determines the hash code for the SimpleGuardedSender. |
void |
initialize(java.lang.String name,
java.lang.String transportName,
java.util.Vector domainNames)
|
static void |
main(java.lang.String[] args)
|
void |
receiveMessage(TransportMessage tmsg)
Implements the receiveMessage method mandated by the MessageListener interface. |
void |
sendMessageTo(java.lang.String receiverName)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected kaos.core.service.directory.KAoSAgentDescription _agentDescription
protected TransportSupport _transportSupport
protected QueryRegistration _query
protected PolicyChecking _policyChecking
Constructor Detail |
---|
public SimpleGuardedSender()
Method Detail |
---|
public void initialize(java.lang.String name, java.lang.String transportName, java.util.Vector domainNames) throws java.lang.Exception
java.lang.Exception
public void receiveMessage(TransportMessage tmsg)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
super.hashCode()
.
hashCode
in class java.lang.Object
public void sendMessageTo(java.lang.String receiverName) throws SearchException, NotLocatableException, KAoSSecurityException, java.lang.NullPointerException, ServiceFailure
SearchException
NotLocatableException
KAoSSecurityException
java.lang.NullPointerException
ServiceFailure
public void authorizeCommunicationAction(java.lang.String performedBy, java.lang.String hasDestination, java.lang.String carriesMessage, java.lang.String hasPartner, java.lang.String dsTransportName) throws KAoSSecurityException, java.lang.NullPointerException, ServiceFailure
performedBy
- String containing the name of the actor performing the CommunicationAction.hasDestination
- String containing the name of the entity receiving the CommunicationAction.carriesMessage
- String containing the content of the CommunicationAction.hasPartner
- String containing the name of the partner in the CommunicationAction.dsTransportName
- String containing the name of the transport used by KAoS Policy service
and other KAoS services to communicate with each other.
KAoSSecurityException
- when the CommunicationAction is forbidden by the current policies.
java.lang.NullPointerException
- when performedBy is null.
ServiceFailure
- when the Policy service cannot be obtained, or fails durin action authorization.public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |