org.scribble.protocol.monitor
Interface Session

All Known Implementing Classes:
DefaultSession

public interface Session

This interface represents a session being monitored, which relates to a protocol evaluating events that belong to a conversation instance.


Method Summary
 void addNodeIndex(int index)
          This method adds a node index to the session.
 Session createInterruptConversation(Session main, int returnIndex)
          This method creates a nested conversation, associated with an interrupt scope, that should return to the supplied index when it completes.
 Session createNestedConversation(int returnIndex)
          This method creates a nested conversation that should return to the supplied index when it completes.
 List<Session> getInterruptConversations()
          This method returns the list of interrupt conversations.
 List<Session> getNestedConversations()
          This method returns the list of nested conversations.
 int getNodeIndexAt(int pos)
          This method returns the node index at the specified position.
 int getNumberOfNodeIndexes()
          This method returns the number of node indexes associated with the session.
 Session getParentConversation()
          This method returns the parent conversation.
 int getReturnIndex()
          This method retrieves the 'return' index associated with a nested session.
 boolean isFinished()
          This method indicates whether the session has finished.
 void removeNestedConversation(Session session)
          This method removes the nested session.
 void removeNodeIndexAt(int index)
          This method removes a node index to the session.
 

Method Detail

addNodeIndex

void addNodeIndex(int index)
This method adds a node index to the session.

Parameters:
index - The index

removeNodeIndexAt

void removeNodeIndexAt(int index)
This method removes a node index to the session.

Parameters:
index - The index

getNumberOfNodeIndexes

int getNumberOfNodeIndexes()
This method returns the number of node indexes associated with the session.

Returns:
The number of node indexes

getNodeIndexAt

int getNodeIndexAt(int pos)
This method returns the node index at the specified position.

Parameters:
pos - The position
Returns:
The node index, or -1 if not found

isFinished

boolean isFinished()
This method indicates whether the session has finished.

Returns:
Whether the session has finished

createNestedConversation

Session createNestedConversation(int returnIndex)
This method creates a nested conversation that should return to the supplied index when it completes.

Parameters:
returnIndex - The return index
Returns:
The nested session

createInterruptConversation

Session createInterruptConversation(Session main,
                                    int returnIndex)
This method creates a nested conversation, associated with an interrupt scope, that should return to the supplied index when it completes.

Parameters:
main - The main session
returnIndex - The return index
Returns:
The session

getReturnIndex

int getReturnIndex()
This method retrieves the 'return' index associated with a nested session.

Returns:
The return index, or -1 if not set

getNestedConversations

List<Session> getNestedConversations()
This method returns the list of nested conversations.

Returns:
The list of nested conversations

getParentConversation

Session getParentConversation()
This method returns the parent conversation.

Returns:
The parent conversation

getInterruptConversations

List<Session> getInterruptConversations()
This method returns the list of interrupt conversations.

Returns:
The interrupt conversations

removeNestedConversation

void removeNestedConversation(Session session)
This method removes the nested session.

Parameters:
session - The session to be removed


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