WebLogic Integration


com.bea.b2b.protocol.xocp.application
Interface XOCPApplicationSession


public interface XOCPApplicationSession

The XOCPApplicationSession interface represents an XOCP application session.

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

Inner Class Summary
static interface XOCPApplicationSession.CreateException
          A CreateException is thrown if conversation creation fails.
static interface XOCPApplicationSession.InitException
          An InitException is thrown if XOCPApplicationSession initialization fails.
static interface XOCPApplicationSession.RegisterException
          A RegisterException is thrown if an error occurred during registration.
static interface XOCPApplicationSession.ShutDownException
          A ShutDownException is thrown if XOCPApplicationSession shutdown fails.
 
Method Summary
 Conversation createConversation(java.lang.String caId, java.lang.String myRole, long timeout)
          Creates a conversation of the specified Collaboration Agreement global identifier and conversation role, and with the specified timeout.
 CAInstance getCA(java.lang.String caId)
          Gets the Collaboration Agreement with this global identifier.
 java.lang.String getCAId(java.util.Properties properties)
          Gets the global identifier of the Collaboration Agreement associated with this session based on the specified properties.
 java.lang.String[] getCAIds()
          Gets the global identifiers of all the Collaboration Agreements for this session.
 Conversation getConversation(java.lang.String conversationId)
          Gets the conversation with the specified conversation ID.
 Conversation[] getConversations()
          Gets all of the conversations in which this XOCP application session is involved, including both conversations initiated and conversations in which the collaborator participated using this XOCP application session.
 java.lang.String getDeliveryChannelName()
          Gets the name of the Delivery Channel associated with this XOCP application session.
 java.lang.String getTradingPartner()
          Gets the name of the trading partner associated with this XOCP application session.
 boolean hasConversation(java.lang.String conversationId)
          Determines whether the specified conversation exists (true) or not (false).
 boolean hasMessageErrorListener()
          Determines whether the message error handler was registered for this XOCP application session (true) or not (false).
 boolean hasMessageListener(java.lang.String caId, java.lang.String myRole)
          Determines whether the message listener was registered for the specified Collaboration Agreement global identifier (true) or not (false).
 void registerMessageErrorListener(XOCPMessageErrorListener listener)
          Registers a message error handler with this XOCP application session.
 void registerMessageListener(java.lang.String caId, java.lang.String myRole, XOCPMessageListener listener)
          Registers a message listener with this XOCP application session.
 void shutDown()
          Shuts down the XOCP application session.
 XOCPMessageErrorListener unregisterMessageErrorListener()
          Unregisters the message error handler from this XOCP application session.
 XOCPMessageListener unregisterMessageListener(java.lang.String caId, java.lang.String myRole)
          Unregisters the message listener from this XOCP application session.
 

Method Detail

getCA

public CAInstance getCA(java.lang.String caId)
Gets the Collaboration Agreement with this global identifier.

Parameters:
caId - Collaboration Agreement global identifier.
Returns:
CAInstance - Collaboration Agreement instance.

getCAId

public java.lang.String getCAId(java.util.Properties properties)
Gets the global identifier of the Collaboration Agreement associated with this session based on the specified properties.

Parameters:
properties - Properties uniquely identifying the CA
Returns:
String[] - Collaboration Agreement global identifiers.

getCAIds

public java.lang.String[] getCAIds()
Gets the global identifiers of all the Collaboration Agreements for this session.

Returns:
String[] - Collaboration Agreement global identifiers.

getDeliveryChannelName

public java.lang.String getDeliveryChannelName()
Gets the name of the Delivery Channel associated with this XOCP application session.

Returns:
String - Delivery Channel name.

getTradingPartner

public java.lang.String getTradingPartner()
Gets the name of the trading partner associated with this XOCP application session.

Returns:
String - Trading partner name.

createConversation

public Conversation createConversation(java.lang.String caId,
                                       java.lang.String myRole,
                                       long timeout)
                                throws XOCPApplicationSession.CreateException
Creates a conversation of the specified Collaboration Agreement global identifier and conversation role, and with the specified timeout.

Parameters:
caId - Collaboration Agreement global identifier.
myRole - Conversation role.
timeout - Conversation timeout, in seconds. This value overrides the default value defined with the conversation definition in the repository. Specify zero (0) to use the value defined in the repository, or to use no timeout if 0 is also set in the repository.
Returns:
Conversation - Conversation instance.
Throws:
XOCPApplicationSession.CreateException - If conversation creation fails.

getConversation

public Conversation getConversation(java.lang.String conversationId)
Gets the conversation with the specified conversation ID.

Parameters:
conversationId - Conversation ID of the conversation to access.
Returns:
Conversation - Conversation.

getConversations

public Conversation[] getConversations()
Gets all of the conversations in which this XOCP application session is involved, including both conversations initiated and conversations in which the collaborator participated using this XOCP application session.

Returns:
Conversation[] - Conversations.

hasConversation

public boolean hasConversation(java.lang.String conversationId)
Determines whether the specified conversation exists (true) or not (false).

Parameters:
conversationId - Conversation ID to check.
Returns:
boolean - true if the specified conversation exists, or false if not.

hasMessageListener

public boolean hasMessageListener(java.lang.String caId,
                                  java.lang.String myRole)
Determines whether the message listener was registered for the specified Collaboration Agreement global identifier (true) or not (false).

Parameters:
caId - Collaboration Agreement global identifier.
myRole - Conversation role.
Returns:
boolean - true if registered for the specified CA identifier and role, or false if not.

registerMessageListener

public void registerMessageListener(java.lang.String caId,
                                    java.lang.String myRole,
                                    XOCPMessageListener listener)
                             throws XOCPApplicationSession.RegisterException
Registers a message listener with this XOCP application session. This method also validates the Collaboration Agreement associated with the identifier.

Parameters:
caId - Global identifier of Collaboration Agreement for which this factory can create listener.
myRole - Conversation role.
listener - Message listener.
Throws:
XOCPApplicationSession.RegisterException - If an error occurred during registration.

unregisterMessageListener

public XOCPMessageListener unregisterMessageListener(java.lang.String caId,
                                                     java.lang.String myRole)
                                              throws XOCPApplicationSession.RegisterException
Unregisters the message listener from this XOCP application session.

Parameters:
caId - Collaboration Agreement global identifier.
myRole - Conversation role.
Returns:
XOCPMessageListener removed message listener
Throws:
XOCPApplicationSession.RegisterException - If an error occurred during unregistration.

hasMessageErrorListener

public boolean hasMessageErrorListener()
Determines whether the message error handler was registered for this XOCP application session (true) or not (false).

Returns:
boolean - true if registered for this session, or false if not.

registerMessageErrorListener

public void registerMessageErrorListener(XOCPMessageErrorListener listener)
                                  throws XOCPApplicationSession.RegisterException
Registers a message error handler with this XOCP application session.

Parameters:
handler - Message error handler.
Throws:
XOCPApplicationSession.RegisterException - If an error occurred during registration.

unregisterMessageErrorListener

public XOCPMessageErrorListener unregisterMessageErrorListener()
                                                        throws XOCPApplicationSession.RegisterException
Unregisters the message error handler from this XOCP application session.

Returns:
XOCPMessageErrorListener removed message error handler
Throws:
XOCPApplicationSession.RegisterException - If an error occurred during unregistration.

shutDown

public void shutDown()
              throws XOCPApplicationSession.ShutDownException,
                     B2BException
Shuts down the XOCP application session.

Throws:
XOCPApplicationSession.ShutDownException - If conversation shutdown fails.
B2BException - If an error occurred.

WebLogic Integration

WebLogic Integration (WLI)