Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.rt
Interface Response

All Known Implementing Classes:
oracle.panama.rt.common.AbstractConnection

public interface Response

This interface represents the response objects in PTG 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

getCharacterEncoding

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

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
java.io.IOException

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

addResponseListener

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

removeResponseListener

public void removeResponseListener(ResponseListener listener)
Remove 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.

removeResponseListeners

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

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

setContent

public void setContent(byte[] result,
                       java.lang.String contentType,
                       int contentLength)
Set the device result given in the device's 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
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.