com.bea.b2b.management.enabler.runtime
Interface ConversationMBean


public interface ConversationMBean

The ConversationMBean interface represents a conversation in which a c-enabler participates.

Author:
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.

Method Summary
 MessageMBean[] getAllMessages()
          Gets MessageMBeans for all of the outstanding business messages sent in this conversation.
 java.lang.String getConversationId()
          Gets the conversation ID of this conversation.
 java.util.Date getLastMessagePublishedTime()
          Gets the time when the last business message was sent by the c-enabler in this conversation.
 java.util.Date getLastMessageReceivedTime()
          Gets the time when the last business message was received by the c-enabler in this conversation.
 int getNumMsgsPublished()
          Gets the number of business messages published by the c-enabler in this conversation.
 int getNumMsgsReceived()
          Gets the number of business messages received by the c-enabler in this conversation.
 int getState()
          Gets the current state of this conversation.
 ConversationType getType()
          Gets the name of the conversation definition associated with this conversation.
 boolean isInitiated()
          Indicates whether this conversation was initiated by this c-enabler (true) or not (false).
 void leave(boolean temporary)
          Leaves this conversation.
 void terminate(int result)
          Terminates this conversation.
 

Method Detail

getConversationId

public java.lang.String getConversationId()
Gets the conversation ID of this conversation.

Returns:
String - Conversation ID.

getNumMsgsPublished

public int getNumMsgsPublished()
Gets the number of business messages published by the c-enabler in this conversation.

Returns:
int - Number of business messages published.

getNumMsgsReceived

public int getNumMsgsReceived()
Gets the number of business messages received by the c-enabler in this conversation.

Returns:
int - Number of business messages received.

getState

public int getState()
Gets the current state of this conversation.

Returns:
int - Conversation state.

getType

public ConversationType getType()
Gets the name of the conversation definition associated with this conversation.

Returns:
Type - Name of the associated conversation definition (in the format name:version:role).

getLastMessagePublishedTime

public java.util.Date getLastMessagePublishedTime()
Gets the time when the last business message was sent by the c-enabler in this conversation.

Returns:
Date - Time when the last business message was sent.

getLastMessageReceivedTime

public java.util.Date getLastMessageReceivedTime()
Gets the time when the last business message was received by the c-enabler in this conversation.

Returns:
Date - Time when the last business message was received.

isInitiated

public boolean isInitiated()
Indicates whether this conversation was initiated by this c-enabler (true) or not (false).

Returns:
boolean - true if this conversation was initiated by this c-enabler, or false if not.

leave

public void leave(boolean temporary)
           throws ManagementException
Leaves this conversation. The initiator of a conversation cannot leave.

Parameters:
temporary - - If true, stores messages on the c-hub until rejoining. - If false (the default), discards messages until rejoining.
Throws:
ManagementException - If an error occurred when leaving this conversation.

terminate

public void terminate(int result)
               throws ManagementException
Terminates this conversation.

Parameters:
result - Conversation termination result.
Throws:
ManagementException - If an error occurred when terminating this conversation.

getAllMessages

public MessageMBean[] getAllMessages()
                              throws ManagementException
Gets MessageMBeans for all of the outstanding business messages sent in this conversation.

Returns:
MessageMBean[] - Array of MessageMBeans for outstanding business messages.
Throws:
ManangementException - thrown if error occurs while getting message information