|
Oracle Fusion Middleware User Messaging Service 11.1.1.3.0 Java API Reference E14011-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DriverConnection
The Messaging driver dispatcher (or Messaging engine) facing driver connection interface. A driver connection is used by the Messaging Driver Dispatcher to access third-party remote gateways. More gateways can be supported by Messaging by plugging in more drivers.
Field Summary | |
---|---|
static int |
MESSAGE_ID_MAX_LENGTH
The maximum length in characters the returned message id can be. |
Method Summary | |
---|---|
CancelResultType |
cancel(java.lang.String gatewayMessageId)
Cancel a message sent. |
void |
close()
Close this driver connection instance. |
MessageListener |
getMessageListener()
This provides the ability to a non-JCA driver component to get the callback message listener for inbound messaging (and status reporting) from this driver connection. |
Status |
getStatus(java.lang.String gatewayMessageId)
Get the sending status of a message. |
WorkingStateType |
getWorkingState()
Check if this connection is still able to send (and/or receive) messages. |
void |
processHttpServletRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is a helper method defined for drivers that have HTTP based protocols, and use a servlet to process incoming HTTP requests. |
void |
registerMessageListener(MessageListener listener)
This provides the ability to a client of this connection to register a callback message listener for inbound messages. |
Status |
replace(java.lang.String gatewayMessageId,
Message message)
Replace a message sent. |
List<Status> |
send(Message message)
Send a message with this driver. |
void |
unregisterMessageListener()
This removes a previously registered message listener from this connection. |
Field Detail |
---|
static final int MESSAGE_ID_MAX_LENGTH
Method Detail |
---|
CancelResultType cancel(java.lang.String gatewayMessageId) throws DriverException
gatewayMessageId
- the message id assigned by the gateway/driver.
DriverException
- if there was an error during this operation.void close()
MessageListener getMessageListener() throws DriverException
DriverException
- if there is no registered message listener.Status getStatus(java.lang.String gatewayMessageId) throws DriverException
gatewayMessageId
- the message id assigned by the gateway/driver.
DriverException
- if there was an error during this operation.WorkingStateType getWorkingState()
The driver instance should check the network connection to the gateway, the status of the gateway and so on. If the driver can't find out what's going on now, it means the driver isn't working.
The driver instance can re-initialize itself if necessary.
void processHttpServletRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws DriverException
SampleReceiveServlet
code part of the sample driver
distribution.
request
- the HTTP servlet request objectresponse
- the HTTP servlet response object
DriverException
- if there was an error during this operation.void registerMessageListener(MessageListener listener) throws DriverException
DriverContext
.
listener
- the message listener
DriverException
- if an error was encountered while registering the
message listener.Status replace(java.lang.String gatewayMessageId, Message message) throws DriverException
gatewayMessageId
- the message id assigned by the gateway/driver.message
- the message to send.
DriverException
- if there was an error during this operation.List<Status> send(Message message) throws DriverException
Drivers implement this method to perform whatever is appropriate for
their particular protocols to send out messages. The content to deliver
as well as the recipients is stored in the message
object.
Further, the driver is expected to return a sending status report for
each recipient. Each report should associate its recipient with a unique
gateway (or driver) id (use Status.setGatewayMessageId(String)
to
assign this unique id). These ids will be used by the Messaging engine to query
the status of the delivery to the recipients when necessary. Typically
the remote gateway will provide a unique id per recipient, and that
should be set as the gateway id in the report. However, in certain
situations, if the remote gateway does not provide message identifiers,
you may use the unique message id in the message (use
Message.getId()
) as the base to generate the unique gateway ids
for the recipients.
message
- the message to send.
DriverException
- if there was an error during this operation.void unregisterMessageListener() throws DriverException
DriverException
- if an error was encountered while unregistering
the message listener.
|
Oracle Fusion Middleware User Messaging Service 11.1.1.3.0 Java API Reference E14011-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |