at.ac.tuwien.infosys.sm4all.copal.api.event
Class ProcessedAction

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.event.ProcessedAction
All Implemented Interfaces:
ContextEventAction

public class ProcessedAction
extends java.lang.Object
implements ContextEventAction

Class which defines an already processed action that was executed on an event. This class has one-to-many association with the BaseEvent. This class is not thread safe.

Author:
sanjin

Constructor Summary
ProcessedAction(CurrentAction action)
          Create instance of ProcessedAction from specified CurrentAction.
ProcessedAction(java.lang.String name, java.lang.String... processedBy)
          Create instance of ProcessedAction with specified name and names of processors.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this ProcessedAction to the specified Object.
 java.lang.String getName()
          Returns the name of this ContextEventAction.
 java.lang.String[] getProcessedBy()
           
 int hashCode()
          Returns hash code for this ProcessedAction.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessedAction

public ProcessedAction(java.lang.String name,
                       java.lang.String... processedBy)
Create instance of ProcessedAction with specified name and names of processors.

Parameters:
name - the name of the ProcessedAction.
processedBy - the names of processors that processed this ProcessedAction.
Throws:
java.lang.NullPointerException - if specified name is null.
java.lang.IllegalArgumentException - if specified name is an empty or blank string.

ProcessedAction

public ProcessedAction(CurrentAction action)
Create instance of ProcessedAction from specified CurrentAction. Name and processedBy properties of the CurrentAction are copied.

Parameters:
action - the CurrentAction.
Throws:
java.lang.NullPointerException - if specified CurrentAction is null.
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ContextEventAction
Returns the name of this ContextEventAction.

Specified by:
getName in interface ContextEventAction
Returns:
the name of this ContextEventAction.

getProcessedBy

public java.lang.String[] getProcessedBy()
Returns:
name of processors that processed this ProcessedAction.

hashCode

public int hashCode()
Returns hash code for this ProcessedAction. The hash code for a ProcessedAction object is hash code of its name.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this processed ProcessedAction.

equals

public boolean equals(java.lang.Object obj)
Compares this ProcessedAction to the specified Object. The result is true if and only if the argument is not null and is ProcessedAction object that has same name and is processed by same processor as this ProcessedAction.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the Object to compare this ProcessedAction against.
Returns:
true if ProcessedActions are equal; false otherwise.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.