Oracle Application Server Integration B2B Callouts Java API Reference
10g Release 2 (10.1.2)

B14417-01
November 2004

oracle.tip.callout
Class CalloutMessage

java.lang.Object
  |
  +--oracle.tip.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

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 CalloutDomainException
set the body of the message. The body type will be set to BYTES.
Parameters:
body - body of the message
CalloutDomainException

setBody

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

setBody

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

setBody

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

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
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 CalloutDomainException
 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.
 
CalloutDomainException

getParameters

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

setParameters

public void setParameters(java.util.Properties props)
                   throws CalloutDomainException
 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.
 
CalloutDomainException

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 Application Server Integration B2B Callouts Java API Reference
10g Release 2 (10.1.2)

B14417-01
November 2004

Copyright © 2004, Oracle. All rights reserved.