|
Oracle Fusion Middleware User Messaging Service 11.1.1.7.0 Java API Reference E14011-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.sdp.messaging.MessagingFactory
public class MessagingFactory
MessagingFactory is a factory class to create various messaging objects. The methods in this class can be used to create Messages, Addresses, AccessPoints, MessageFilters, and MessageQueries.
Constructor Summary | |
---|---|
MessagingFactory()
|
Method Summary | |
---|---|
static Address |
buildAddress(java.lang.String deviceAddress,
DeliveryType deliveryType,
java.lang.String emailMode)
Build a Address object. |
static Address |
buildAddress(java.lang.String deviceAddress,
java.lang.String deliveryType,
java.lang.String emailMode)
Build a Address object. |
static AccessPoint |
createAccessPoint(AccessPoint.AccessPointType apType,
DeliveryType deliveryType,
java.lang.String value)
Create a new access point. |
static AccessPoint |
createAccessPoint(AccessPoint.AccessPointType apType,
DeliveryType deliveryType,
java.lang.String value,
java.lang.String keyword)
Create a new access point. |
static AccessPoint |
createAccessPoint(Address address)
Create a new access point from an Address object. |
static AccessPoint |
createAccessPoint(Address address,
java.lang.String keyword)
Create a new access point from an Address object. |
static Address |
createAddress(java.lang.String address)
Create a new Address object from address . |
static Address[] |
createAddress(java.lang.String[] addresses)
Create a list of Address objects from
addresses . |
static MessageFilter |
createBlacklistFilter(java.lang.String pattern)
Create a "blacklist" filter. |
static Message |
createMessage()
Create a new message. |
static MessageFilter |
createMessageFilter(java.lang.String pattern,
MessageFilter.FieldType field,
java.lang.String fieldName,
MessageFilter.Action action)
Create a new MessageFilter. |
static MessageInfo |
createMessageInfo()
Create a MessageInfo object. |
static MessageQuery |
createMessageQuery()
Create a new MessagingQuery. |
static Message |
createTextMessage(java.lang.String textContent)
Create a text message with text/plain content type. |
static Message |
createTextMessage(java.lang.String textContent,
java.lang.String charset)
Create a text message with text/plain content type and specified charset. |
static MessageFilter |
createWhitelistFilter(java.lang.String pattern)
Create a "whitelist" filter. |
static List<java.lang.String> |
expandAccessPoint(AccessPoint accessPoint)
Utility method to generate a list containing the expanded set of addresses from an access point. |
static List<java.lang.String> |
expandAccessPoint(AccessPoint accessPoint,
boolean withKeyword)
Utility method to generate a list containing the expanded set of addresses from an access point, either with our without keywords included. |
static java.lang.String |
getRecipientType(Address address)
Return the recipient type (To/Cc/Bcc) of an address. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessagingFactory()
Method Detail |
---|
public static AccessPoint createAccessPoint(AccessPoint.AccessPointType apType, DeliveryType deliveryType, java.lang.String value)
apType
- the access point type.deliveryType
- the access point address delivery type.value
- the access point address value.
public static AccessPoint createAccessPoint(AccessPoint.AccessPointType apType, DeliveryType deliveryType, java.lang.String value, java.lang.String keyword)
apType
- the access point type.deliveryType
- the access point address delivery type.value
- the access point address value.keyword
- the access point keyword value. If a keyword is specified,
incoming messages will only match the access point if the first token of the
message's subject (if present) or text/plain part (if present) matches the
keyword.
public static AccessPoint createAccessPoint(Address address)
address
- an object of oracle.sdp.messaging.Address interface
public static AccessPoint createAccessPoint(Address address, java.lang.String keyword)
address
- an object of oracle.sdp.messaging.Address interfacekeyword
- the access point keyword value. If a keyword is specified,
incoming messages will only match the access point if the first token of the
message's subject (if present) or text/plain part (if present) matches the
keyword.
* @return an AccessPoint of type SINGLE_ADDRESS built from the input
address and keyword.public static List<java.lang.String> expandAccessPoint(AccessPoint accessPoint)
accessPoint
- the access point to expand
public static List<java.lang.String> expandAccessPoint(AccessPoint accessPoint, boolean withKeyword)
accessPoint
- the access point to expandwithKeyword
- flag indicating whether the access point keyword should be
included in the returned strings.
public static Address createAddress(java.lang.String address)
Address
object from address
.
address
- a well-formatted address in String form. The format must
be of the form "deliveryType:address
". For
example: "Email:john.doe@oracle.com". Alternatively, to address
users or groups, you may specify "User:username
"
or "Group:groupname
". For example: "User:johndoe"
or "Group:johndoe_team". public static Address[] createAddress(java.lang.String[] addresses)
Address
objects from
addresses
.
addresses
- a list of well-formatted addresses in String form.
public static Address buildAddress(java.lang.String deviceAddress, java.lang.String deliveryType, java.lang.String emailMode)
Address
object.
deviceAddress
- the device addressdeliveryType
- the delivery typeemailMode
- the email mode of the address - available options are:
null OR Address.EMAIL_MODE_TO, Address.EMAIL_MODE_CC,
Address.EMAIL_MODE_BCC for Email delivery type.
Address
object.public static Address buildAddress(java.lang.String deviceAddress, DeliveryType deliveryType, java.lang.String emailMode)
Address
object.
deviceAddress
- the device addressdeliveryType
- the delivery typeemailMode
- the email mode of the address - available options are:
null OR Address.EMAIL_MODE_TO, Address.EMAIL_MODE_CC,
Address.EMAIL_MODE_BCC for Email delivery type.
Address
object.public static java.lang.String getRecipientType(Address address)
address
-
public static Message createMessage()
public static Message createTextMessage(java.lang.String textContent) throws MessagingException
textContent
- the plain text content to set in the message.
MessagingException
public static Message createTextMessage(java.lang.String textContent, java.lang.String charset) throws MessagingException
textContent
- the plain text content to set in the message.charset
- the charset name, such as UTF-8 or US-ASCII.
charset
"
set as the content type.
MessagingException
public static MessageInfo createMessageInfo()
public static MessageQuery createMessageQuery()
public static MessageFilter createMessageFilter(java.lang.String pattern, MessageFilter.FieldType field, java.lang.String fieldName, MessageFilter.Action action)
pattern
- The pattern to match the incoming message against. The
pattern should be a Java Pattern
.
For example:.*foo.*
^foo.*
field
- The part of the message to match against.fieldName
- If "field" is HEADER or METADATA, this parameter
determines which header or metadata entry to match against.action
- The action to take if the filter and message match.
The action is taken immediately, so no further filters will be
processed.public static MessageFilter createBlacklistFilter(java.lang.String pattern)
Pattern
.
public static MessageFilter createWhitelistFilter(java.lang.String pattern)
|
Oracle Fusion Middleware User Messaging Service 11.1.1.7.0 Java API Reference E14011-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |