com.ibm.websphere.sca

Interface Service


  1. public interface Service
The Service interface provides information about, and access to, an SCA service. The object returned by the ServiceManager.locateService() method implements this interface.

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
ASYNC
Used to indicate an asynchronous preferred interaction style
  1. static
  2. java.lang.String
COPYRIGHT
  1. static
  2. int
NOWAIT
Used to specify a timeout on the invokeResponse() method.
  1. static
  2. java.lang.String
SYNC
Used to indicate a synchronous preferred interaction style
  1. static
  2. int
WAIT
Used to specify a timeout on the invokeResponse() method.

Method Summary

Modifier and Type Method and Description
  1. EndpointReference
getEndpointReference()
Returns an endpoint reference representing the endpoint of the target service.
  1. java.lang.String
getPreferredInteractionStyle(OperationType operationType)
Returns the preferred interaction style for the specified operation.
  1. Reference
getReference()
Returns the SCDL reference object representing the reference to the target service.
  1. java.lang.Object
invoke(OperationType operationType,java.lang.Object input)
Synchronously invokes a business operation on the target service.
  1. java.lang.Object
invoke(java.lang.String operationName,java.lang.Object input)
Synchronously invokes a business operation on the target service.
  1. Ticket
invokeAsync(OperationType operationType,java.lang.Object input)
Sends an asynchronous request to a business operation on the target service.
  1. Ticket
invokeAsync(java.lang.String operationName,java.lang.Object input)
Sends an asynchronous request to a business operation on the target service.
  1. Ticket
invokeAsyncWithCallback(OperationType operationType,java.lang.Object input)
Sends an asynchronous request to a business operation on the target service.
  1. Ticket
invokeAsyncWithCallback(java.lang.String operationName,java.lang.Object input)
Sends an asynchronous request to a business operation on the target service.
  1. java.lang.Object
invokeResponse(Ticket ticket,long timeout)
Retrieves the response to an asynchronous request.

Field Detail

  1. static final java.lang.String COPYRIGHT
See Also:

WAIT

  1. static final int WAIT
Used to specify a timeout on the invokeResponse() method. The response operation will not return until the response data is available.
See Also:

NOWAIT

  1. static final int NOWAIT
Used to specify a timeout on the invokeResponse() method. The response operation will return the response if available otherwise it will throw a ServiceTimeoutRuntimeException
See Also:

SYNC

  1. static final java.lang.String SYNC
Used to indicate a synchronous preferred interaction style
See Also:

ASYNC

  1. static final java.lang.String ASYNC
Used to indicate an asynchronous preferred interaction style
See Also:

Method Detail

invoke

  1. java.lang.Object invoke(java.lang.String operationName,
  2. java.lang.Object input)
  3. throws ServiceBusinessException
Synchronously invokes a business operation on the target service.
Parameters:
operationName - The name of the operation.
input - The input business data.
Returns:
The output business data.
Throws:
ServiceBusinessException - Business exception thrown by the target business operation.

invoke

  1. java.lang.Object invoke(OperationType operationType,
  2. java.lang.Object input)
  3. throws ServiceBusinessException
Synchronously invokes a business operation on the target service.
Parameters:
operationType - The OperationType representing the target operation.
input - The input business data.
Returns:
The output business data.
Throws:
ServiceBusinessException - Business exception thrown by the target business operation.

invokeAsync

  1. Ticket invokeAsync(java.lang.String operationName,
  2. java.lang.Object input)
Sends an asynchronous request to a business operation on the target service. The asynchronous response can be retrieved later by calling the invokeResponse method.
Parameters:
operationName - The name of the operation.
input - The input business data.
Returns:
The ticket representing the asynchronous invocation.

invokeAsync

  1. Ticket invokeAsync(OperationType operationType,
  2. java.lang.Object input)
Sends an asynchronous request to a business operation on the target service. The asynchronous response can be retrieved later by calling the invokeResponse method.
Parameters:
operationType - The OperationType representing the target operation.
input - The input business data.
Returns:
The ticket identifying the asynchronous invocation.

invokeAsyncWithCallback

  1. Ticket invokeAsyncWithCallback( java.lang.String operationName,
  2. java.lang.Object input)
Sends an asynchronous request to a business operation on the target service. The current component will be called back later and passed the asynchronous response.
Parameters:
operationName - The name of the operation.
input - The input business data.
Returns:
The ticket identifying the asynchronous invocation.

invokeAsyncWithCallback

  1. Ticket invokeAsyncWithCallback( OperationType operationType,
  2. java.lang.Object input)
Sends an asynchronous request to a business operation on the target service. The current component will be called back later and passed the asynchronous response.
Parameters:
operationType - The OperationType representing the target operation.
input - The input business data.
Returns:
The ticket identifying the asynchronous invocation.

invokeResponse

  1. java.lang.Object invokeResponse( Ticket ticket,
  2. long timeout)
  3. throws ServiceBusinessException
Retrieves the response to an asynchronous request.
Parameters:
ticket - The ticket identifying the asynchronous interaction, returned from a previous call to the invokeAsync() method.
timeout - The time to wait for the response in milliseconds.
Returns:
Object The output business data.
Throws:
ServiceBusinessException - Business exception thrown by the target business operation.

getPreferredInteractionStyle

  1. java.lang.String getPreferredInteractionStyle( OperationType operationType)
Returns the preferred interaction style for the specified operation.
Parameters:
operationType - The OperationType representing the target operation.
Returns:
The preferred interaction style.

getReference

  1. Reference getReference()
Returns the SCDL reference object representing the reference to the target service.
Returns:
The SCDL reference object.

getEndpointReference

  1. EndpointReference getEndpointReference( )
Returns an endpoint reference representing the endpoint of the target service.
Returns:
The endpoint reference for the target service.