org.scribble.protocol.model
Class Interaction

java.lang.Object
  extended by org.scribble.protocol.model.ModelObject
      extended by org.scribble.protocol.model.Activity
          extended by org.scribble.protocol.model.Interaction

public class Interaction
extends Activity

This class represents an interaction: the communication of a message from one role to another, or several others.


Constructor Summary
Interaction()
          The default constructor.
Interaction(Interaction i)
          The copy constructor.
Interaction(Role fromRole, Collection<Role> toRoles, MessageSignature sig)
          This method initializes the 'from' and 'to' roles, and message signature.
Interaction(Role fromRole, MessageSignature sig)
          This constructor initializes the 'from' role and message signature.
Interaction(Role fromRole, Role toRole, MessageSignature sig)
          This method initializes the 'from' and 'to' roles, and message signature.
 
Method Summary
 boolean equals(Object o)
           
 Role getFromRole()
          This method returns the optional 'from' role.
 MessageSignature getMessageSignature()
          This method returns the message signature.
 List<Role> getToRoles()
          This method returns the optional (one or many) 'to' roles.
 int hashCode()
           
 void setFromRole(Role part)
          This method sets the optional 'from' role.
 void setMessageSignature(MessageSignature signature)
          This method sets the message signature.
 String toString()
           
 void visit(Visitor visitor)
          This method visits the model object using the supplied visitor.
 
Methods inherited from class org.scribble.protocol.model.Activity
getEnclosingProtocol
 
Methods inherited from class org.scribble.protocol.model.ModelObject
derivedFrom, getAnnotations, getModel, getParent, getProperties, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Interaction

public Interaction()
The default constructor.


Interaction

public Interaction(Interaction i)
The copy constructor.

Parameters:
i - The interaction to copy

Interaction

public Interaction(Role fromRole,
                   MessageSignature sig)
This constructor initializes the 'from' role and message signature.

Parameters:
fromRole - The 'from' role
sig - The message signature

Interaction

public Interaction(Role fromRole,
                   Role toRole,
                   MessageSignature sig)
This method initializes the 'from' and 'to' roles, and message signature.

Parameters:
fromRole - The 'from' role
toRole - The 'to' role
sig - The message signature

Interaction

public Interaction(Role fromRole,
                   Collection<Role> toRoles,
                   MessageSignature sig)
This method initializes the 'from' and 'to' roles, and message signature.

Parameters:
fromRole - The 'from' role
toRoles - The 'to' roles
sig - The message signature
Method Detail

getMessageSignature

public MessageSignature getMessageSignature()
This method returns the message signature.

Returns:
The message signature

setMessageSignature

public void setMessageSignature(MessageSignature signature)
This method sets the message signature.

Parameters:
signature - The message signature

getFromRole

public Role getFromRole()
This method returns the optional 'from' role.

Returns:
The optional 'from' role

setFromRole

public void setFromRole(Role part)
This method sets the optional 'from' role.

Parameters:
part - The optional 'from' role

getToRoles

public List<Role> getToRoles()
This method returns the optional (one or many) 'to' roles.

Returns:
The optional 'to' roles

toString

public String toString()
Overrides:
toString in class Object

visit

public void visit(Visitor visitor)
This method visits the model object using the supplied visitor.

Specified by:
visit in class ModelObject
Parameters:
visitor - The visitor

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2008-Present Scribble.org. All Rights Reserved.