commonj.connector.runtime
Interface ExtendedMessageListener


public interface ExtendedMessageListener

A listener interface supporting inbound messages with notification and request-response style. The resource adapter separates the inbound message into interaction properties and data, using the InboundInteractionSpec and CCI Record.

This function is symmetric with the outbound invocation.

The runtime implementation must use the InboundNativeDataRecord.

Since:
1.1
See Also:
InboundNativeDataRecord

Method Summary
 Record onMessage(InboundInteractionSpec interactionSpec, Record eventRecord)
          Method invoked by the resource adapter to deliver synchronous event to the endpoint.
 void onNotification(InboundInteractionSpec interactionSpec, Record eventRecord)
          Method invoked by the resource adapter to deliver one way inbound notification to the endpoint.
 

Method Detail

onNotification

void onNotification(InboundInteractionSpec interactionSpec,
                    Record eventRecord)
                    throws ResourceException
Method invoked by the resource adapter to deliver one way inbound notification to the endpoint.

Parameters:
interactionSpec - provides metadata about the inbound event.
eventRecord - is inbound event data, may be null.
Throws:
ResourceException - if an error occured during execution

onMessage

Record onMessage(InboundInteractionSpec interactionSpec,
                 Record eventRecord)
                 throws ResourceException
Method invoked by the resource adapter to deliver synchronous event to the endpoint.

Parameters:
interactionSpec - provides metadata about the inbound event.
eventRecord - inbound event data, may be null.
Returns:
Record a result of the event invocation, may be null.
Throws:
ResourceException - if an error occured during execution