|
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 MessagingClient
Base interface of all SDP Messaging clients: EJB Client, Web Service Client, etc.
Field Summary | |
---|---|
static java.lang.String |
VERSION_NUMBER
The Messaging Client API version number. |
Method Summary | |
---|---|
void |
acknowledge()
Acknowledge all outstanding messages that have been received using any of the receive methods in this class. |
boolean |
cancel(java.lang.String messageId)
Cancel a message previously sent. |
AccessPoint[] |
getAccessPoints()
Get a list of all access points currently registered by this application. |
MessageFilter[] |
getMessageFilters()
Get the set of currently registered message filters for this application. |
Iterator<java.lang.String> |
getMessageIDs(MessageQuery query)
Get the ids of all sent messages that fit the specified search criteria. |
Listener |
getMessageListener()
Get a reference to the current default message listener, if any. |
Status[] |
getStatus(java.lang.String messageId)
Get the up-to-date statuses of all recipients of a sent message. |
Status[] |
getStatus(java.lang.String messageId,
Address[] addresses)
Get all sending and failover statuses up to date of a set of recipients. |
Listener |
getStatusListener()
Get a reference to the current default status listener, if any. |
DeliveryType[] |
getSupportedDeliveryTypes()
Get a list of the current delivery types supported by the Messaging Server that this client is connected to. |
java.lang.String |
getVersion()
Get the version number of this Messaging Client API. |
Message[] |
receive()
Synchronously receive messages. |
Message[] |
receive(AccessPoint accessPoint)
Perform a synchronous receive operation for a particular AccessPoint registered by this client. |
void |
registerAccessPoint(AccessPoint accessPoint)
Register an access point for receiving messages. |
void |
registerAccessPoint(AccessPoint accessPoint,
Listener listener,
Serializable correlator)
Register an access point, specifying a MessageListener callback object. |
void |
registerAccessPoints(AccessPoint[] accessPoints)
Register a set of access points. |
void |
registerMessageFilter(MessageFilter filter)
Register a message filter. |
void |
registerMessageFilters(MessageFilter[] filters)
Register a set of message filters. |
java.lang.String |
replace(java.lang.String messageId,
Message message)
Replace a message previously submitted to the gateway for sending with a new Message. |
java.lang.String |
send(Message message)
Send a message. |
java.lang.String |
send(Message message,
Listener listener,
Serializable correlator)
Send a message, specifying a StatusListener callback object. |
void |
setMessageListener(Listener listener)
Set a default message listener. |
void |
setStatusListener(Listener listener)
Set a default status listener. |
void |
unregisterAccessPoint(AccessPoint accessPoint)
Unregister an access point. |
void |
unregisterAccessPoints(AccessPoint[] accessPoints)
Unregister a set of access points. |
void |
unregisterMessageFilter(MessageFilter filter)
Remove a message filter from the current filter chain. |
void |
unregisterMessageFilters(MessageFilter[] filters)
Remove a set of message filters from the current filter chain. |
Field Detail |
---|
static final java.lang.String VERSION_NUMBER
Method Detail |
---|
void acknowledge() throws MessagingException
MessagingException
boolean cancel(java.lang.String messageId) throws MessagingException, NoPermissionException
messageId
- message identifier of existing Message to be cancelled.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the message cannot be cancelled.AccessPoint[] getAccessPoints() throws MessagingException, NoPermissionException
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the access points cannot be retrieved.MessageFilter[] getMessageFilters() throws MessagingException, NoPermissionException
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the message filters cannot be retrieved.Iterator<java.lang.String> getMessageIDs(MessageQuery query) throws MessagingException
query
- the message query.
MessagingException
Listener getMessageListener() throws MessagingException
MessagingException
Status[] getStatus(java.lang.String messageId) throws MessagingException, NoPermissionException
messageId
- the message identifier of a previously sent Message.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the statuses cannot be retrieved.Status[] getStatus(java.lang.String messageId, Address[] addresses) throws MessagingException, NoPermissionException
messageId
- the message identifier of a previously sent Message.addresses
- the set of recipient addresses whose statuses are
requested.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the statuses cannot be retrieved.Listener getStatusListener() throws MessagingException
MessagingException
DeliveryType[] getSupportedDeliveryTypes() throws MessagingException
MessagingException
- if there is an error while invoking this operation.java.lang.String getVersion()
Message[] receive() throws MessagingException, NotSupportedException
It performs a non-blocking call, so if no message is currently available, the method returns null.
Note: A single invocation does not guarantee retrieval of all available messages. You must poll to ensure receiving all available messages.
MessagingException
- if there was an error while attempting to
receive a message.
NotSupportedException
- if this operation is not supported by this
implementation.Message[] receive(AccessPoint accessPoint) throws MessagingException
accessPoint
-
MessagingException
void registerAccessPoint(AccessPoint accessPoint) throws MessagingException, NoPermissionException
For example:
AccessPoint accessPointSingleAddress =
AccessPointFactory.createAccessPoint(AccessPoint.AccessPointType.SINGLE_ADDRESS, DeliveryType.SMS, "9000");
messagingClient.registerAccessPoint(accessPointSingleAddress);
AccessPoint accessPointRangeAddress =
AccessPointFactory.createAccessPoint(AccessPoint.AccessPointType.NUMBER_RANGE, DeliveryType.SMS,"9000,9999");
messagingClient.registerAccessPoint(accessPointRangeAddress);
accessPoint
- the access point to register.
NoPermissionException
- if the client has insufficient permissions
to perform this operation, for example if the access point is
already registered by another application. In the case of a
Number Range access point, registration is "all or nothing" - if
any of the addresses in the range is unavailable, none of the
addresses will be registered.
MessagingException
- if the access point cannot be registered.void registerAccessPoint(AccessPoint accessPoint, Listener listener, Serializable correlator) throws MessagingException
accessPoint
- listener
- correlator
- Any serializable object. If provided, his object will be passed back
to the onMessage callback method when a message is received.
MessagingException
void registerAccessPoints(AccessPoint[] accessPoints) throws MessagingException, NoPermissionException
accessPoints
- the set of access points to register.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the access points cannot be registered.registerAccessPoint(AccessPoint)
void registerMessageFilter(MessageFilter filter) throws MessagingException, NoPermissionException
For example:
MessageFilter subjectFilter =
MessageFilterFactory.createMessageFilter("spam", MessageFilter.FieldType.SUBJECT, null, MessageFilter.Action.REJECT);
messagingClient.registerMessageFilter(subjectFilter);
MessageFilter senderFilter =
MessageFilterFactory.createBlacklistFilter("spammer@foo.com");
messagingClient.registerMessageFilter(senderFilter);
filter
- the filter to register. *
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the message filter cannot be registered.void registerMessageFilters(MessageFilter[] filters) throws MessagingException, NoPermissionException
filters
- the filters to register.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the message filters cannot be registered.registerMessageFilter(MessageFilter)
java.lang.String replace(java.lang.String messageId, Message message) throws MessagingException, NoPermissionException
messageId
- message identifier of existing Message to be replaced.message
- the new message.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the message cannot be found or replaced.java.lang.String send(Message message) throws MessagingException
message
- the message to be delivered.
MessagingException
- if the message cannot be sent.java.lang.String send(Message message, Listener listener, Serializable correlator) throws MessagingException
message
- listener
- correlator
- Any serializable object. If provided, this object will be passed back to
the onStatus callback method when a status notification is received.
MessagingException
void setMessageListener(Listener listener) throws MessagingException
listener
-
MessagingException
void setStatusListener(Listener listener) throws MessagingException
listener
-
MessagingException
void unregisterAccessPoint(AccessPoint accessPoint) throws MessagingException, NoPermissionException
accessPoint
- the access point to unregister.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the access point cannot be unregistered.void unregisterAccessPoints(AccessPoint[] accessPoints) throws MessagingException, NoPermissionException
accessPoints
- the set of access points to unregister.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the access points cannot be unregistered.unregisterAccessPoint(AccessPoint)
void unregisterMessageFilter(MessageFilter filter) throws MessagingException, NoPermissionException
filter
- the filter to unregister.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the message filter cannot be unregistered.void unregisterMessageFilters(MessageFilter[] filters) throws MessagingException, NoPermissionException
filters
- the filters to unregister.
NoPermissionException
- if the client has insufficient permissions
to perform this operation.
MessagingException
- if the message filters cannot be unregistered.unregisterMessageFilter(MessageFilter)
|
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 |