public class MessagingFactory extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static String | APPROLE_APPID_PREFIXFor internal use. | 
| Constructor and Description | 
|---|
| MessagingFactory() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Address | buildAddress(String deviceAddress,
            DeliveryType deliveryType,
            String emailMode)Build a  Addressobject. | 
| static Address | buildAddress(String deviceAddress,
            String deliveryType,
            String emailMode)Build a  Addressobject. | 
| static AccessPoint | createAccessPoint(AccessPointType apType,
                 DeliveryType deliveryType,
                 String value)Create a new access point. | 
| static AccessPoint | createAccessPoint(AccessPointType apType,
                 DeliveryType deliveryType,
                 String value,
                 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,
                 String keyword)Create a new access point from an Address object. | 
| static Address | createAddress(String address)Create a new  Addressobject fromaddress. | 
| static Address[] | createAddress(String[] addresses)Create a list of  Addressobjects fromaddresses. | 
| static Address | createAppRoleAddress(String roleName,
                    String applicationId)Create a new Application Role  Addressobject. | 
| static MessageFilter | createBlacklistFilter(String pattern)Create a "blacklist" filter. | 
| static Message | createMessage()Create a new message. | 
| static MessageFilter | createMessageFilter(String pattern,
                   FilterFieldType field,
                   String fieldName,
                   FilterActionType action)Create a new MessageFilter. | 
| static MessageInfo | createMessageInfo()Create a MessageInfo object. | 
| static MessageQuery | createMessageQuery()Create a new MessagingQuery. | 
| static Message | createTextMessage(String textContent)Create a text message with text/plain content type. | 
| static Message | createTextMessage(String textContent,
                 String charset)Create a text message with text/plain content type and specified
 charset. | 
| static MessageFilter | createWhitelistFilter(String pattern)Create a "whitelist" filter. | 
| static String | getMetadata(MessagingObject mo,
           String namespace,
           String name)Retrieve a metadata value from a MessagingObject. | 
| static String | getRecipientType(Address address)Return the recipient type (To/Cc/Bcc) of an address. | 
| static void | setMetadata(MessagingObject mo,
           String namespace,
           String name,
           String value)Set a metadata value from a MessagingObject. | 
public static final String APPROLE_APPID_PREFIX
public static AccessPoint createAccessPoint(AccessPointType apType, DeliveryType deliveryType, String value)
apType - the access point type.deliveryType - the access point address delivery type.value - the access point address value.public static AccessPoint createAccessPoint(AccessPointType apType, DeliveryType deliveryType, String value, 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 interfacepublic static AccessPoint createAccessPoint(Address address, String keyword)
address - an object of oracle.ucs.ws.messaging.types.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 Address createAddress(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:user@example.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 createAppRoleAddress(String roleName, String applicationId)
Address object.roleName - the application role name.applicationId - the application id (name) to which the role name belong.
          If set to null, application id is set to
          oracle.security.
          jps.internal.api.runtime.AppSecurityContext
          .getApplicationID().public static Address[] createAddress(String[] addresses)
Address objects from
 addresses.addresses - a list of well-formatted addresses in String form.public static Address buildAddress(String deviceAddress, String deliveryType, String emailMode)
Address object.deviceAddress - the device addressdeliveryType - the delivery typeemailMode - the email mode of the address - available options are:
          null OR oracle.sdp.messaging.Address.EMAIL_MODE_TO,
          oracle.sdp.messaging.Address.EMAIL_MODE_CC,
          oracle.sdp.messaging.Address.EMAIL_MODE_BCC for Email
          delivery type.Address object.public static Address buildAddress(String deviceAddress, DeliveryType deliveryType, String emailMode)
Address object.deviceAddress - the device addressdeliveryType - the delivery typeemailMode - the email mode of the address - available options are:
          null OR oracle.sdp.messaging.Address.EMAIL_MODE_TO,
          oracle.sdp.messaging.Address.EMAIL_MODE_CC,
          oracle.sdp.messaging.Address.EMAIL_MODE_BCC for Email
          delivery type.Address object.public static String getRecipientType(Address address)
address - The address to inspect.public static String getMetadata(MessagingObject mo, String namespace, String name)
mo - MesagingObject whose metadata is to be inspected.namespace - Namespace of the entry to retrieve.name - Name of the entry to retrieve.public static void setMetadata(MessagingObject mo, String namespace, String name, String value)
mo - MesagingObject whose metadata is to be updated.namespace - Namespace of the entry to set.name - Name of the entry to set.value - Value of the entry to set.public static Message createMessage()
public static Message createTextMessage(String textContent) throws MessagingException
textContent - the plain text content to set in the message.MessagingExceptionpublic static Message createTextMessage(String textContent, 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.MessagingExceptionpublic static MessageInfo createMessageInfo()
public static MessageQuery createMessageQuery()
public static MessageFilter createMessageFilter(String pattern, FilterFieldType field, String fieldName, FilterActionType 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(String pattern)
Pattern.public static MessageFilter createWhitelistFilter(String pattern)
Copyright © 2009,2014 Oracle and/or its affiliates. All rights reserved.