Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06

weblogic.wsee.conversation
Class ConversationUtils

java.lang.Object
  extended by weblogic.wsee.conversation.ConversationUtils

public class ConversationUtils
extends Object

This is a utiltily class for using Conversational Web Services. It allows you to do common things such as getting and setting conversation id, and setting configuration options.


Field Summary
static String CONVERSATION_ID
           
static String SERVER_NAME
           
 
Constructor Summary
ConversationUtils()
           
 
Method Summary
static void continueConversation(Stub stub, Map props)
          Continue a conversation on a stub that wasn't originally in the conversation.
static String getConversationAppVersion(weblogic.wsee.message.WlMessageContext wlmc)
           
static String getConversationId(Stub stub)
          This method gets the conversation id on the stub.
static int getConversationMethodBlockTimeout(Stub stub)
          This method gets the previously set block timeout.
static Integer getConversationVersion(Stub stub)
          This method gets the current conversation version.
static boolean isConversational(weblogic.wsee.wsdl.WsdlBinding binding)
          Determines if a given binding is conversational
static boolean isConversational(weblogic.wsee.ws.WsPort port)
          Determines if a given port is conversational
static void renewStub(Stub stub)
          Renew a stub so it can be used to start a new conversation.
static void setConversationId(Stub stub, String id)
          This method sets conversation id on the stub.
static void setConversationMethodBlockTimeout(Stub stub, int numsecs)
          Set how long a conversational continue method should block while waiting for the server to assign a conversation id.
static void setConversationVersionOne(Stub stub)
          Use version one converation (client assigned conversation id)
static void setConversationVersionTwo(Stub stub)
          Use version two converation (server assigned conversation id) This is the default when no version property is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_NAME

public static final String SERVER_NAME
See Also:
Constant Field Values

CONVERSATION_ID

public static final String CONVERSATION_ID
See Also:
Constant Field Values
Constructor Detail

ConversationUtils

public ConversationUtils()
Method Detail

getConversationId

public static String getConversationId(Stub stub)
                                throws ConversationIdNotYetAvailableException
This method gets the conversation id on the stub. In case of server assigned conversation id, it will throw a ConversationIdNotYetAvailableException when it's still waiting for server to assign the id. In other cases where conversation id is not available, a null is returned.

Parameters:
stub - The jaxrpc stub that's used to carry the conversational invoke.
Returns:
Conversation id.
Throws:
ConversationIdNotYetAvailableException - The stub is still waiting for server to assign the conversation id.

setConversationId

public static void setConversationId(Stub stub,
                                     String id)
This method sets conversation id on the stub. This means it's using client assigned conversation id.

Parameters:
stub - The jaxrpc stub that's used to carry the conversational invoke.
id - The conversation id to be set.

setConversationVersionOne

public static void setConversationVersionOne(Stub stub)
Use version one converation (client assigned conversation id)

Parameters:
stub - The jaxrpc stub that's used to carry the conversational invoke.

setConversationVersionTwo

public static void setConversationVersionTwo(Stub stub)
Use version two converation (server assigned conversation id) This is the default when no version property is set.

Parameters:
stub - The jaxrpc stub that's used to carry the conversational invoke.

getConversationVersion

public static Integer getConversationVersion(Stub stub)
This method gets the current conversation version. The possible values are: WLStub.CONVERSATION_VERSION_ONE, WLStub.CONVERSATION_VERSION_TWO

Parameters:
stub - The jaxrpc stub that's used to carry the conversational invoke.
Returns:
The conversation version.

setConversationMethodBlockTimeout

public static void setConversationMethodBlockTimeout(Stub stub,
                                                     int numsecs)
Set how long a conversational continue method should block while waiting for the server to assign a conversation id.

Parameters:
stub - The jaxrpc stub that's used to carry the conversational invoke.
numsecs - The number of seconds to wait.

getConversationMethodBlockTimeout

public static int getConversationMethodBlockTimeout(Stub stub)
This method gets the previously set block timeout. A default value is returned if no such property was set. (Currently default is set to be 2 minutes)

Parameters:
stub - The jaxrpc stub that's used to carry the conversational invoke.
Returns:
The current conversational continue method block timeout.

isConversational

public static boolean isConversational(weblogic.wsee.ws.WsPort port)
Determines if a given port is conversational

Parameters:
port - The port to check
Returns:
true if the port is conversational (e.g. has a binding operation with conversation semantics)

isConversational

public static boolean isConversational(weblogic.wsee.wsdl.WsdlBinding binding)
Determines if a given binding is conversational

Parameters:
binding - The binding to check
Returns:
true if the binding is conversational (e.g. has conversation semantics)

getConversationAppVersion

public static String getConversationAppVersion(weblogic.wsee.message.WlMessageContext wlmc)

renewStub

public static void renewStub(Stub stub)
Renew a stub so it can be used to start a new conversation. After renew, this stub no longer participates in existing conversations started earlier through this stub.

Parameters:
stub - The stub to be renewed.

continueConversation

public static void continueConversation(Stub stub,
                                        Map props)
Continue a conversation on a stub that wasn't originally in the conversation. A map of key, value pairs need to be passed in. Currently the supported keys are: conversationId, serverName

Parameters:
stub - The stub.
props - The properties required to continue a conversation.

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06