Oracle Fusion Middleware B2B Callout Java API Reference for Oracle SOA Suite
11g Release 1 (11.1.1.6.3)

E18157-06

oracle.tip.b2b.callout
Class CalloutMessage

java.lang.Object
  extended by oracle.tip.b2b.callout.CalloutMessage

public class CalloutMessage
extends java.lang.Object

This class represents a callout message object. If the message is a functional acknowledgment, then the message has to have a property functional_ack=true


Field Summary
protected  java.lang.Object body_
           
static int BYTES
           
static int STRING
           
 
Constructor Summary
CalloutMessage()
           
CalloutMessage(byte[] body)
          Instanciate object with byte array data
CalloutMessage(java.lang.String body)
          Instanciate object with string data
 
Method Summary
 java.lang.Object getBody()
          get the body in the original form
 byte[] getBodyAsBytes()
          get the body of the message as byte array.
 java.io.InputStream getBodyAsInputStream()
          get the body of the message
 java.io.Reader getBodyAsReader()
          get the body of the message
 java.lang.String getBodyAsString()
          get the body of the message as String object
 java.lang.String getBodyAsString(java.lang.String enc)
          get the body of the message as String object.
 java.lang.String getParameter(java.lang.String name)
          Get a parameter.
 java.util.Enumeration getParameterNames()
          get an Enumeration of parameter names
 java.util.Properties getParameters()
          Get all parameters.
 int getType()
          get the type of body of the message
 void setBody(byte[] body)
          set the body of the message.
 void setBody(java.io.InputStream in)
          set the body of the message.
 void setBody(java.io.Reader reader)
          set the body of the message.
 void setBody(java.lang.String body)
          set the body of the message.
 void setParameter(java.lang.String name, java.lang.String value)
           Set a parameter for a message.
 void setParameters(java.util.Properties props)
           Set parameters for a message.
 void setType(int type)
          set the type of body of the message
 java.lang.String toString()
          converts MessageObject to String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

body_

protected java.lang.Object body_

STRING

public static final int STRING
See Also:
Constant Field Values

BYTES

public static final int BYTES
See Also:
Constant Field Values
Constructor Detail

CalloutMessage

public CalloutMessage()

CalloutMessage

public CalloutMessage(java.lang.String body)
Instanciate object with string data


CalloutMessage

public CalloutMessage(byte[] body)
Instanciate object with byte array data

Method Detail

setType

public void setType(int type)
set the type of body of the message

Parameters:
int - can be either CalloutMessage.STRING or CalloutMessage.BYTES

getType

public int getType()
get the type of body of the message

Returns:
an int which is STRING or BYTES

setBody

public void setBody(byte[] body)
             throws B2BDomainException
set the body of the message. The body type will be set to BYTES.

Parameters:
body - body of the message
Throws:
B2BDomainException

setBody

public void setBody(java.lang.String body)
             throws B2BDomainException
set the body of the message. The body type will be set to STRING.

Parameters:
body - body of the message
Throws:
B2BDomainException

setBody

public void setBody(java.io.InputStream in)
             throws B2BDomainException
set the body of the message. The body type will be set to BYTES.

Parameters:
a - InputStream that contains the message
Throws:
B2BDomainException

setBody

public void setBody(java.io.Reader reader)
             throws B2BDomainException
set the body of the message. The body type will be set to STRING.

Parameters:
a - reader that can be used to read the message
Throws:
B2BDomainException

getBody

public java.lang.Object getBody()
get the body in the original form

Returns:
an object which represents the body of the message. The object can be a String or byte[].

getBodyAsString

public java.lang.String getBodyAsString()
get the body of the message as String object

Returns:
the message in String object

getBodyAsString

public java.lang.String getBodyAsString(java.lang.String enc)
                                 throws java.io.UnsupportedEncodingException
get the body of the message as String object. If the body is bytes, the enc is used to decode the byte stream.

Returns:
the message in String object
Throws:
java.io.UnsupportedEncodingException

getBodyAsBytes

public byte[] getBodyAsBytes()
get the body of the message as byte array.

Returns:
the message in byte[]

getBodyAsReader

public java.io.Reader getBodyAsReader()
get the body of the message

Returns:
a Reader object representing the body of the message

getBodyAsInputStream

public java.io.InputStream getBodyAsInputStream()
get the body of the message

Returns:
a InputStream object representing the body of the message

getParameter

public java.lang.String getParameter(java.lang.String name)
Get a parameter.


setParameter

public void setParameter(java.lang.String name,
                         java.lang.String value)
                  throws B2BDomainException
 Set a parameter for a message. This parameter can
 be transport or security related.
 If paramater has been set in the Transport object, 
 this will override the setting set earlier.
 

Throws:
B2BDomainException

getParameters

public java.util.Properties getParameters()
Get all parameters.


setParameters

public void setParameters(java.util.Properties props)
                   throws B2BDomainException
 Set parameters for a message. The parameters can
 be transport or security related.
 If a paramater has been set in the Transport object, 
 this will override the setting in the Transport object.
 

Throws:
B2BDomainException

getParameterNames

public java.util.Enumeration getParameterNames()
get an Enumeration of parameter names


toString

public java.lang.String toString()
converts MessageObject to String

Overrides:
toString in class java.lang.Object

Oracle Fusion Middleware B2B Callout Java API Reference for Oracle SOA Suite
11g Release 1 (11.1.1.6.3)

E18157-06

Copyright © 2007, 2012, Oracle and/or its affiliates. All rights reserved.