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

oracle.sdp.messaging
Class MessageFactory

java.lang.Object
  extended by oracle.sdp.messaging.MessageFactory

public abstract class MessageFactory
extends java.lang.Object

Factory (singleton) class to create Message objects

Since:
11.0.0

Method Summary
abstract  Message createMessage()
          Create a new message.
abstract  Message createTextMessage(java.lang.String textContent)
          Create a text message with text/plain content type.
abstract  Message createTextMessage(java.lang.String textContent, java.lang.String charset)
          Create a text message with text/plain content type and specified charset.
static MessageFactory getInstance()
          Get singleton instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createMessage

public abstract Message createMessage()
Create a new message.

Returns:
a new message.

createTextMessage

public abstract Message createTextMessage(java.lang.String textContent)
                                   throws MessagingException
Create a text message with text/plain content type.

Parameters:
textContent - the plain text content to set in the message.
Returns:
a message created with the specified textContent set as the content and with text/plain set as the content type.
Throws:
MessagingException

createTextMessage

public abstract Message createTextMessage(java.lang.String textContent,
                                          java.lang.String charset)
                                   throws MessagingException
Create a text message with text/plain content type and specified charset.

Parameters:
textContent - the plain text content to set in the message.
charset - the charset name, such as UTF-8 or US-ASCII.
Returns:
a message created with the specified textContent set as the content and with text/plain; charset="charset" set as the content type.
Throws:
MessagingException

getInstance

public static MessageFactory getInstance()
Get singleton instance.


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.