Sonic ESB API

com.sonicsw.esb.service.common
Interface SFCServiceContext

All Superinterfaces:
SFCInitializationContext

public interface SFCServiceContext
extends SFCInitializationContext

Context for service invocations.


Method Summary
 void addFault(XQEnvelope fault)
          Adds the specified envelope to the faultbox.
 void addFault(XQMessage fault)
          Wraps the specified message in an envelope and adds it to the faultbox.
 void addIncomingToOutbox()
          Add the incoming message envelope to the outbox.
 void addOutgoing(XQEnvelope outgoing)
          Adds the specified envelope to the outbox.
 void addOutgoing(XQMessage outgoing)
          Wraps the specified message in an envelope and adds it to the outbox.
 void clearFaults()
          Clears the faultbox of all envelopes.
 void clearOutgoing()
          Clears the outbox of all envelopes.
 javax.jms.Connection getCurrentJMSConnection()
          Returns the JMS Connection associated with the current dispatch.
 javax.jms.Session getCurrentJMSSession()
          Returns the JMS Session associated with the current dispatch.
 int getCurrentListener()
          Returns the id of the current listener thread.
 XQEnvelope getMessageEnvelope()
          Returns the message envelope currently being handled.
 XQProcessContext getProcessContext()
          Returns the current process context, or null if the service has not been invoked as part of a process.
 java.lang.String getProcessID()
          Return the current process tracking id, or the empty string if not in a process.
 java.lang.String getProcessName()
          Return the current process name, or the empty string if not in a process.
 java.lang.String getProcessStepName()
          Return the current process step name, or the empty string if not in a process.
 VariableParser getVariableParser()
          Returns a variable parser that can be used during service and has access to the current message envelope.
 XQServiceContext getXQServiceContext()
          Provides access to the standard XQServiceContext.
 boolean hasFaults()
          Indicates whether there are any faults currently in the faultbox.
 boolean hasOutgoing()
          Indicates whether there are any messages currently in the outbox.
 boolean isInProcess()
          Returns true if the current invocation is a step in an ESB process.
 
Methods inherited from interface com.sonicsw.esb.service.common.SFCInitializationContext
getAbsoluteServiceInstanceName, getAddressFactory, getDispatcher, getDomainName, getEndpointManager, getEnvelopeFactory, getESBContainerName, getLifeCycle, getMessageFactory, getMFContainerName, getNumberOfListeners, getParameters, getServiceName, getServiceTypeName, getXQInitContext, setXQInitContext
 

Method Detail

getMessageEnvelope

XQEnvelope getMessageEnvelope()
Returns the message envelope currently being handled.


addIncomingToOutbox

void addIncomingToOutbox()
Add the incoming message envelope to the outbox. If the envelope has no addresses (for example, if this service has no exit endpoint) then this method does nothing.


getCurrentListener

int getCurrentListener()
Returns the id of the current listener thread.


isInProcess

boolean isInProcess()
Returns true if the current invocation is a step in an ESB process.


getProcessID

java.lang.String getProcessID()
Return the current process tracking id, or the empty string if not in a process.


getProcessName

java.lang.String getProcessName()
Return the current process name, or the empty string if not in a process.


getProcessStepName

java.lang.String getProcessStepName()
Return the current process step name, or the empty string if not in a process.


addFault

void addFault(XQEnvelope fault)
Adds the specified envelope to the faultbox.


addFault

void addFault(XQMessage fault)
Wraps the specified message in an envelope and adds it to the faultbox.


hasFaults

boolean hasFaults()
Indicates whether there are any faults currently in the faultbox.


clearFaults

void clearFaults()
Clears the faultbox of all envelopes.


addOutgoing

void addOutgoing(XQEnvelope outgoing)
Adds the specified envelope to the outbox.


addOutgoing

void addOutgoing(XQMessage outgoing)
Wraps the specified message in an envelope and adds it to the outbox.


clearOutgoing

void clearOutgoing()
Clears the outbox of all envelopes.


hasOutgoing

boolean hasOutgoing()
Indicates whether there are any messages currently in the outbox.


getVariableParser

VariableParser getVariableParser()
Returns a variable parser that can be used during service and has access to the current message envelope.

Specified by:
getVariableParser in interface SFCInitializationContext

getXQServiceContext

XQServiceContext getXQServiceContext()
Provides access to the standard XQServiceContext.


getProcessContext

XQProcessContext getProcessContext()
Returns the current process context, or null if the service has not been invoked as part of a process.


getCurrentJMSSession

javax.jms.Session getCurrentJMSSession()
Returns the JMS Session associated with the current dispatch.

Returns:
current JMS Session or null if not available
See Also:
XQServiceContext.getCurrentJMSSession()

getCurrentJMSConnection

javax.jms.Connection getCurrentJMSConnection()
Returns the JMS Connection associated with the current dispatch.

Returns:
current JMS Connection or null if not available
See Also:
XQServiceContext.getCurrentJMSConnection()

Sonic ESB API

Copyright © 2001-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-Mar-2012.