org.jboss.blacktie.jatmibroker.jab
Class JABServiceInvoker

java.lang.Object
  extended by org.jboss.blacktie.jatmibroker.jab.JABServiceInvoker

public class JABServiceInvoker
extends Object

Create an invoker for a remote service. It must be constructed using a JABSession and the name of the service to invoke.

See Also:
JABSession

Constructor Summary
JABServiceInvoker(String aServiceName, JABSession aJABSession, String bufferType, String bufferSubType)
          The remote service constructor allows the programmer to access a remote XATMI service.
 
Method Summary
 void call(JABTransaction tx)
          Call the remote service within the scope of the transaction specified in the signature of the invocation.
 void clear()
          Clear the request and response buffers prior to a re-invocation.
 int getRCode()
          Get the rcode that tpreturn returned with.
 JABMessage getRequest()
          Get the content of the outbound buffer.
 JABMessage getResponse()
          Get the content of the response message
 void setNoTimeout(boolean noTimeout)
          Do not timeout the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JABServiceInvoker

public JABServiceInvoker(String aServiceName,
                         JABSession aJABSession,
                         String bufferType,
                         String bufferSubType)
                  throws JABException
The remote service constructor allows the programmer to access a remote XATMI service.

Parameters:
aServiceName - The name of the service to invoke
aJABSession - The session to use
Throws:
JABException - In case the remote service cannot be accessed.
Method Detail

call

public void call(JABTransaction tx)
          throws TransactionException,
                 JABException
Call the remote service within the scope of the transaction specified in the signature of the invocation.

Parameters:
tx - The transactional scoping. The current transaction is suspended if tx is null or not equal to the current transaction. If tx is not null and not equal to the current transaction then it is resumed. The transaction to thread association is restored after the method returns.
Throws:
TransactionException - If the transaction cannot be handled
JABException - If the call cannot be issued.

clear

public void clear()
Clear the request and response buffers prior to a re-invocation.


setNoTimeout

public void setNoTimeout(boolean noTimeout)
Do not timeout the request.

Parameters:
noTimeout - Do not stop waiting for responses.

getRequest

public JABMessage getRequest()
Get the content of the outbound buffer.

Returns:
The requests input

getResponse

public JABMessage getResponse()
Get the content of the response message

Returns:
The requests output

getRCode

public int getRCode()
Get the rcode that tpreturn returned with.

Returns:
The application return code.


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.