Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.rt
Interface Response


public interface Response

This interface represents the response objects in Runtime.

Since:
Oracle9i Application Server Wireless Edition

Method Summary
 void addResponseListener(ResponseListener listener)
          Add a listener for events from this response.
 void addResponseListeners(java.util.Vector listeners)
          Add a collection of listeners for events from response object.
 java.lang.String getCharacterEncoding()
          Get the language and locale used for character encoding
 java.lang.String getContent()
          Get the response string.
 java.lang.String getContent(Device device)
          Get the response string rendered by the specified device transformer.
 org.w3c.dom.Element getXMLContent()
          Get the response data in XML document format.
 void removeResponseListener(ResponseListener listener)
          Remove a listener for events from this response.
 void removeResponseListeners(java.util.Vector listeners)
          Remove a collection of listeners for events from response object.
 void sendRedirect(java.lang.String location)
          Send a URL to redirect the user agent or runtime agent to another location.
 void setContent(byte[] result, java.lang.String contentType, int contentLength)
          Set the device result given in the device's markup language.
 void setContent(java.lang.String ml)
          Set the response string.
 void setXMLContent(org.w3c.dom.Element xml)
          Set the response data in XML document format.

 

Method Detail

addResponseListener

public void addResponseListener(ResponseListener listener)
Add a listener for events from this response.

addResponseListeners

public void addResponseListeners(java.util.Vector listeners)
Add a collection of listeners for events from response object.

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Get the language and locale used for character encoding
Returns:
a string of the form ISO8859-n

getContent

public java.lang.String getContent()
Get the response string. Used to transfer data from one response object to another response object for nested or recursive service requests.
Returns:
the response string in some markup language

getContent

public java.lang.String getContent(Device device)
                            throws java.lang.Exception
Get the response string rendered by the specified device transformer.
Parameters:
device - the device to be rendered for
Returns:
the response string in some markup language
Throws:
java.lang.Exception

getXMLContent

public org.w3c.dom.Element getXMLContent()
Get the response data in XML document format. Used to transfer data from one response object to another response object for nested or recursive service requests. XML documents are easier than Strings for merge and transformation.
Returns:
the root element of the XML document

removeResponseListener

public void removeResponseListener(ResponseListener listener)
Remove a listener for events from this response.

removeResponseListeners

public void removeResponseListeners(java.util.Vector listeners)
Remove a collection of listeners for events from response object.

sendRedirect

public void sendRedirect(java.lang.String location)
                  throws java.io.IOException
Send a URL to redirect the user agent or runtime agent to another location.
Parameters:
location - the URL for the new target
Throws:
java.io.IOException

setContent

public void setContent(byte[] result,
                       java.lang.String contentType,
                       int contentLength)
Set the device result given in the device's markup language.

setContent

public void setContent(java.lang.String ml)
Set the response string. Used to transfer data from one response object to another response object for nested or recursive service requests.
Parameters:
ml - the response string in some markup language

setXMLContent

public void setXMLContent(org.w3c.dom.Element xml)
Set the response data in XML document format. Used to transfer data from one response object to another response object for nested or recursive service requests. XML documents are easier than Strings for merge and transformation.

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.