com.wm.app.b2b.server
Class InvokeState

java.lang.Object
  extended by FixedData
      extended by com.wm.app.b2b.server.InvokeState

public class InvokeState
extends FixedData

The InvokeState encapsulates some of the most important information about service invocations on the webMethods Integration Server. This includes:

If you're implementing a ContentHandler interface, this class will be interesting to you because of the getXXX methods. The setXXX methods have been marked as "semi-protected"; they are intended for the implementation of server listeners.

See Also:
ContentHandler

Constructor Summary
InvokeState()
           
 
Method Summary
 java.lang.String getContentEncoding()
          Returns the encoding of the content.
 ContentInfo getContentInfo()
          Returns the ContentInfo object.
 java.lang.String getContentType()
          Returns the content type of the input posted to this service.
static iContext getCurrentIContext()
          Returns the client iContext for this session.
static java.util.Locale getCurrentLocale()
          Returns the client locale for this session.
static NSService getCurrentService()
          Returns the service info of the current invoke state.
static Session getCurrentSession()
          Returns the session of the current invoke state.
static java.net.Socket getCurrentSocket()
          Returns the socket of the current invoke state.
static InvokeState getCurrentState()
          Returns the current thread's invoke state.
static User getCurrentUser()
          Returns the user of the current invoke state.
 iContext getIContext()
          Returns the iContext associated with this InvokeState.
 iContext getIContextPolicy()
          Returns the iContext policy for this session or service.
 Values getInput()
          Returns the input to this service.
 java.util.Locale getLocale()
          Deprecated. Replaced by getSessionIContext
 IData getPipeline()
           
 ProtocolInfoIf getProtocolInfoIf()
          Accessor to the ProtocolInfoIf reference.
 NSService getService()
          Returns information about the service being invoked.
 Session getSession()
          Returns the session of the invoking thread.
 iContext getSessionIContext()
          Returns the iContext from the session, not from the InvokeState.
 User getUser()
          Returns the user associated with this invocation.
 java.lang.String getUserAgent()
          Returns the user agent (e.g.
static java.lang.Object[][] InvokeState_schema()
           
 void setPipeline(IData pipeline)
           
static void setSessionUser(User newuser)
          Set the user in the current InvokeState.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvokeState

public InvokeState()
Method Detail

InvokeState_schema

public static java.lang.Object[][] InvokeState_schema()

getUser

public User getUser()
Returns the user associated with this invocation.

Returns:
The user invoking this service.

getUserAgent

public java.lang.String getUserAgent()
Returns the user agent (e.g. "Mozilla ...").

Returns:
A String containing the name of the user agent.

getSession

public Session getSession()
Returns the session of the invoking thread.

Returns:
A Session object.

getService

public NSService getService()
Returns information about the service being invoked.

Returns:
An NSService object for this service.

getInput

public Values getInput()
Returns the input to this service.

Returns:
the input Values to this service.

getPipeline

public IData getPipeline()

getContentType

public java.lang.String getContentType()
Returns the content type of the input posted to this service. If the content type is a complex one, the parameters can be fetched separately.

Returns:
a MIME type for the input posted to this service

getContentInfo

public ContentInfo getContentInfo()
Returns the ContentInfo object. ContentInfo encapsulates Content-type, Content-type Parameters, and Content-encoding.

Returns:
ContentInfo object.

getContentEncoding

public java.lang.String getContentEncoding()
Returns the encoding of the content.


getLocale

public java.util.Locale getLocale()
Deprecated. Replaced by getSessionIContext

Returns the client locale for this session.

Returns:
a Locale object

getIContext

public iContext getIContext()
Returns the iContext associated with this InvokeState.

This method always returns a concrete iContext. It does not return an abstract one. To get the policy associated with the service, use getIContextPolicy.

Returns:
an iContext object

getIContextPolicy

public iContext getIContextPolicy()
Returns the iContext policy for this session or service. This may be an abstract iContext.

Returns:
an iContext object

getSessionIContext

public iContext getSessionIContext()
Returns the iContext from the session, not from the InvokeState.

Returns:
an iContext object

setPipeline

public void setPipeline(IData pipeline)

setSessionUser

public static void setSessionUser(User newuser)
Set the user in the current InvokeState. This also updates the current Session.

Parameters:
newuser - The user to become.

getProtocolInfoIf

public ProtocolInfoIf getProtocolInfoIf()
Accessor to the ProtocolInfoIf reference. This is required as the ContentHandler object may need a handle to more Protocol specific information, which is not present with the InvokeState object.


getCurrentState

public static InvokeState getCurrentState()
Returns the current thread's invoke state.

Returns:
The current InvokeState (null if there isn't one).

getCurrentSocket

public static java.net.Socket getCurrentSocket()
Returns the socket of the current invoke state.

Returns:
The socket (null if there isn't one).

getCurrentSession

public static Session getCurrentSession()
Returns the session of the current invoke state.

Returns:
The session (null if there isn't one).

getCurrentLocale

public static java.util.Locale getCurrentLocale()
Returns the client locale for this session.

Returns:
a Locale object

getCurrentIContext

public static iContext getCurrentIContext()
Returns the client iContext for this session.

Returns:
an iContext object

getCurrentService

public static NSService getCurrentService()
Returns the service info of the current invoke state.

Returns:
The service info (null if there isn't any).

getCurrentUser

public static User getCurrentUser()
Returns the user of the current invoke state.

Returns:
The user (null if there isn't any).

toString

public java.lang.String toString()