Oracle Fusion Middleware User Messaging Service 11.1.1.1.0 Java API Reference
E14011-01

oracle.sdp.messaging.driver
Class DriverResourceAdapterBase

java.lang.Object
  extended by oracle.sdp.messaging.driver.DriverResourceAdapterBase
All Implemented Interfaces:
Serializable, javax.resource.spi.ResourceAdapter, DriverResourceAdapter, MessageListener, WorkingStateListener, oracle.sdpinternal.messaging.config.CommandListener

public abstract class DriverResourceAdapterBase
extends java.lang.Object
implements DriverResourceAdapter, MessageListener, oracle.sdpinternal.messaging.config.CommandListener, WorkingStateListener

Base class for a Driver's ResourceAdapter implementation. It contains:

A new Driver ResourceAdapter should extend from this class.

Since:
11.0.0
See Also:
Serialized Form

Constructor Summary
DriverResourceAdapterBase()
          This constructor initializes the base RA.
 
Method Summary
 void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory factory, javax.resource.spi.ActivationSpec spec)
           
 void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory factory, javax.resource.spi.ActivationSpec spec)
           
 java.lang.String getCapability()
          The driver capability.
 java.lang.String getCost()
          Get the cost level.
 java.lang.String getDefaultSenderAddress()
           
 DriverContext getDriverContext()
          Get the driver context.
 java.lang.String getDriverInstanceId()
          Get the unique driver instance id.
 java.lang.String getInstanceName()
          The driver instance name.
 Properties getProperties()
          Get the driver configuration properties.
 java.lang.String getSenderAddresses()
           
 java.lang.String getSendingQueuesInfo()
          The driver sending queues info.
 java.lang.String getSpeed()
          Get the speed level.
 java.lang.String getSupportedCarriers()
          Get the supported carriers.
 java.lang.String getSupportedContentTypes()
           
 java.lang.String getSupportedDeliveryTypes()
           
 java.lang.String getSupportedProtocols()
          Get the supported protocols.
 java.lang.String getSupportedStatusTypes()
           
 java.lang.String getSupportsCancel()
           
 java.lang.String getSupportsReplace()
           
 java.lang.String getSupportsStatusPolling()
           
 java.lang.String getSupportsTracking()
           
 javax.transaction.xa.XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] as)
           
 void onCommand(MessagingObject command)
          Command message callback.
 void onMessage(Message message)
          Message callback entry point.
 void onStatus(Status status)
          The on-status call-back.
 void onWorkingStateChanged(WorkingStateType stateType)
          Callback to indicate change in working state.
 void registerDriverInfo()
          Register this driver's information with an Messaging engine.
 void setCapability(java.lang.String capability)
          The driver capability.
 void setCost(java.lang.String cost)
          Set the cost level.
 void setDefaultSenderAddress(java.lang.String defaultSenderAddress)
          The default sender address.
 void setInstanceName(java.lang.String instanceName)
          The driver instance name.
 void setSenderAddresses(java.lang.String senderAddresses)
          The list of sender addresses that the driver supports.
 void setSendingQueuesInfo(java.lang.String sendingQueuesInfo)
          The information of the queues that this driver's DriverDispatcherBean MDB instances are listening to for sending messages.
 void setSpeed(java.lang.String speed)
          Set the speed level.
 void setSupportedCarriers(java.lang.String carriers)
          Set the supported carriers.
 void setSupportedContentTypes(java.lang.String supportedContentTypes)
          The supported content types.
 void setSupportedDeliveryTypes(java.lang.String supportedDeliveryTypes)
          The supported delivery types.
 void setSupportedProtocols(java.lang.String protocols)
          Set the supported protocols.
 void setSupportedStatusTypes(java.lang.String supportedStatusTypes)
          The types of status supported by the driver.
 void setSupportsCancel(java.lang.String supportsCancel)
          Indicates whether the driver supports the message cancel operation.
 void setSupportsReplace(java.lang.String supportsReplace)
          Indicates whether the driver supports the message replace operation.
 void setSupportsStatusPolling(java.lang.String supportsStatusPolling)
          For certain protocols, an active polling of the remote gateway must be performed to check the status of a message previously sent.
 void setSupportsTracking(java.lang.String supportsTracking)
          Indicates whether the driver supports status tracking.
 void start(javax.resource.spi.BootstrapContext ctx)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.sdp.messaging.driver.DriverResourceAdapter
startDriver, stopDriver
 

Constructor Detail

DriverResourceAdapterBase

public DriverResourceAdapterBase()
This constructor initializes the base RA.

Method Detail

endpointActivation

public void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory factory,
                               javax.resource.spi.ActivationSpec spec)
                        throws javax.resource.ResourceException
Specified by:
endpointActivation in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.ResourceException
See Also:
ResourceAdapter.endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)

endpointDeactivation

public void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory factory,
                                 javax.resource.spi.ActivationSpec spec)
Specified by:
endpointDeactivation in interface javax.resource.spi.ResourceAdapter
See Also:
ResourceAdapter.endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)

getCapability

public java.lang.String getCapability()
The driver capability.


getCost

public java.lang.String getCost()
Get the cost level.

Returns:
the cost level.

getDefaultSenderAddress

public java.lang.String getDefaultSenderAddress()
Returns:
returns the defaultSenderAddress.

getDriverContext

public DriverContext getDriverContext()
Get the driver context.

Returns:
the driver context.

getDriverInstanceId

public java.lang.String getDriverInstanceId()
Get the unique driver instance id.


getInstanceName

public java.lang.String getInstanceName()
The driver instance name.


getProperties

public Properties getProperties()
Get the driver configuration properties.

Returns:
the driver configuration properties.

getSenderAddresses

public java.lang.String getSenderAddresses()
Returns:
returns the senderAddresses.

getSendingQueuesInfo

public java.lang.String getSendingQueuesInfo()
The driver sending queues info.


getSpeed

public java.lang.String getSpeed()
Get the speed level.

Returns:
the speed level.

getSupportedCarriers

public java.lang.String getSupportedCarriers()
Get the supported carriers.

Returns:
the supported carriers.

getSupportedContentTypes

public java.lang.String getSupportedContentTypes()
Returns:
returns the supportedContentTypes.

getSupportedDeliveryTypes

public java.lang.String getSupportedDeliveryTypes()
Returns:
returns the supportedDeliveryTypes.

getSupportedProtocols

public java.lang.String getSupportedProtocols()
Get the supported protocols.

Returns:
the supported protocols.

getSupportedStatusTypes

public java.lang.String getSupportedStatusTypes()
Returns:
returns the supportedStatusTypes.

getSupportsCancel

public java.lang.String getSupportsCancel()
Returns:
returns the supportsCancel.

getSupportsReplace

public java.lang.String getSupportsReplace()
Returns:
returns the supportsReplace.

getSupportsStatusPolling

public java.lang.String getSupportsStatusPolling()
Returns:
returns the supportsStatusPolling.

getSupportsTracking

public java.lang.String getSupportsTracking()
Returns:
returns the supportsTracking.

getXAResources

public javax.transaction.xa.XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] as)
                                                 throws javax.resource.ResourceException
Specified by:
getXAResources in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.ResourceException

onCommand

public void onCommand(MessagingObject command)
               throws MessagingException
Description copied from interface: oracle.sdpinternal.messaging.config.CommandListener
Command message callback. TODO KK use CommandMessage instead of MessagingObject after other refactoring.

Specified by:
onCommand in interface oracle.sdpinternal.messaging.config.CommandListener
Parameters:
command - the command message
Throws:
MessagingException - listener can throw this exception to indicate errors.

onMessage

public void onMessage(Message message)
Message callback entry point.

Specified by:
onMessage in interface MessageListener
Parameters:
message - the message sent to the listener.

onStatus

public void onStatus(Status status)
Description copied from interface: MessageListener
The on-status call-back.

Specified by:
onStatus in interface MessageListener
Parameters:
status - the status sent to the listener.

onWorkingStateChanged

public void onWorkingStateChanged(WorkingStateType stateType)
Description copied from interface: WorkingStateListener
Callback to indicate change in working state. The driver base can use this callback event to determine when to register the driver with the engine.

RUNNING indicates the driver is successfully initialized and can be registered with the engine.

Specified by:
onWorkingStateChanged in interface WorkingStateListener
Parameters:
stateType - the new working state.

registerDriverInfo

public void registerDriverInfo()
                        throws DriverException
Register this driver's information with an Messaging engine. This method spawns a Timer or Worker which will periodically and asynchronously send registration messages to the engine.

Throws:
DriverException

setCapability

public void setCapability(java.lang.String capability)
The driver capability. Supported Values: SEND, RECEIVE, BOTH (default).


setCost

public void setCost(java.lang.String cost)
Set the cost level.

Parameters:
cost - the cost level.

setDefaultSenderAddress

public void setDefaultSenderAddress(java.lang.String defaultSenderAddress)
The default sender address. This is the address the driver uses when sending a message that has no sender address specified, or when the specified sender address is not in the login addresses list and the driver does not support using the application provided sender address.

Parameters:
defaultSenderAddress - the defaultSenderAddress to set.

setInstanceName

public void setInstanceName(java.lang.String instanceName)
The driver instance name. Recommended to use the JNDI name of the Driver RA's connection factory.


setSenderAddresses

public void setSenderAddresses(java.lang.String senderAddresses)
The list of sender addresses that the driver supports. If provided by the driver, the Messaging Engine can use this to route a sending message to the driver by matching against the sender address of the message.

Parameters:
senderAddresses - the senderAddresses to set.

setSendingQueuesInfo

public void setSendingQueuesInfo(java.lang.String sendingQueuesInfo)
The information of the queues that this driver's DriverDispatcherBean MDB instances are listening to for sending messages. The format for the value of this property is: JNDIQueueConnectionFactoryName1:JNDIQueueName1[[,JNDIQueueName2]; JNDIQueueConnectionFactoryName2:JNDIQueueName3]

Examples:


setSpeed

public void setSpeed(java.lang.String speed)
Set the speed level.

Parameters:
speed - the speed level.

setSupportedCarriers

public void setSupportedCarriers(java.lang.String carriers)
Set the supported carriers.

Parameters:
carriers - the supported carriers.

setSupportedContentTypes

public void setSupportedContentTypes(java.lang.String supportedContentTypes)
The supported content types.

Parameters:
supportedContentTypes - the supportedContentTypes to set.

setSupportedDeliveryTypes

public void setSupportedDeliveryTypes(java.lang.String supportedDeliveryTypes)
The supported delivery types.

Parameters:
supportedDeliveryTypes - the supportedDeliveryTypes to set.

setSupportedProtocols

public void setSupportedProtocols(java.lang.String protocols)
Set the supported protocols.

Parameters:
protocols - the supported protocols.

setSupportedStatusTypes

public void setSupportedStatusTypes(java.lang.String supportedStatusTypes)
The types of status supported by the driver. This depends on
  1. what types the gateway supports,
  2. what types the driver implements.
The types should be the common denominator of these two.

Parameters:
supportedStatusTypes - the supportedStatusTypes to set.

setSupportsCancel

public void setSupportsCancel(java.lang.String supportsCancel)
Indicates whether the driver supports the message cancel operation.

Parameters:
supportsCancel - the supportsCancel to set.

setSupportsReplace

public void setSupportsReplace(java.lang.String supportsReplace)
Indicates whether the driver supports the message replace operation.

Parameters:
supportsReplace - the supportsReplace to set.

setSupportsStatusPolling

public void setSupportsStatusPolling(java.lang.String supportsStatusPolling)
For certain protocols, an active polling of the remote gateway must be performed to check the status of a message previously sent. This property indicates whether the driver supports such status polling. If it does, the Messaging engine may invoke the driver connection's getStatus() operation.

Parameters:
supportsStatusPolling - the supportsStatusPolling to set.

setSupportsTracking

public void setSupportsTracking(java.lang.String supportsTracking)
Indicates whether the driver supports status tracking.

Parameters:
supportsTracking - the supportsTracking to set.

start

public void start(javax.resource.spi.BootstrapContext ctx)
           throws javax.resource.spi.ResourceAdapterInternalException
Specified by:
start in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.ResourceAdapterInternalException

stop

public void stop()
Specified by:
stop in interface javax.resource.spi.ResourceAdapter

Oracle Fusion Middleware User Messaging Service 11.1.1.1.0 Java API Reference
E14011-01

Copyright © 2009 Oracle and/or its affiliates. All rights reserved.