AQxmlServlet - Oracle 9i

Syntax

public class AQxmlServlet implements java.lang.Runnable

oracle.AQ.xml.AQxmlServlet

All Implemented Interfaces:

java.lang.Runnable

Description

AQxmlServlet - this is the AQ xml servlet which handles HTTP POST requests from clients.

This servlet can be deployed in any servlet engine that implements Javasoft's Servlet2.2 standard. Users are required to extend this servlet and define a

AQ data source (to connect to the database instance) before deploying it

AQxmlServlet
AQxmlServlet

Methods
doGet(HttpServletRequest, HttpServletResponse)

protected void doGet(oracle.AQ.xml.HttpServletRequest request,
oracle.AQ.xml.HttpServletResponse response)

This method handles HTTP GET requests. This is just used to test whether the servlet has been deployed successfully. In general all AQ operations

must be sent as HTTP POST requests.

doPost(HttpServletRequest, HttpServletResponse)

protected void doPost(oracle.AQ.xml.HttpServletRequest request,
oracle.AQ.xml.HttpServletResponse response)

This method handles HTTP POST requests. This is the main entry point for the AQ xml servlet. This routine expects the incoming stream to be of type text/xml which contains an XML message conforming to he IDAP schema

Parameters:

request - - the http post request
response - - the response object. The output is written to this stream

Throws:

ServletException, - IOException

getAQDataSource()

public synchronized AQxmlDataSource getAQDataSource()
get the AQ data source that will be used by this servlet to the database

getEmailServerAddr()

public java.lang.String getEmailServerAddr()
Get the IP address of the email server

getEmailServerHost()

public java.lang.String getEmailServerHost()
Get the email server host name

getUserCallback()

public final AQxmlCallback getUserCallback()
get the callback registered by the user

setAQDataSource(AQxmlDataSource)

public final synchronized void setAQDataSource(AQxmlDataSource data_source)

Subclasses must call this method in the init method of the servlet to specify the database connect parameters (username/password, sid, portno etc)

Parameters:

data_source - the AQ data source

setAQSchemaLocation(String)

public synchronized void setAQSchemaLocation(java.lang.String schema_location)
setAQxmlSchemaLocation - set the location of the AQ IDAP schema.

By default we pick up the schema from the envelope.xsd, aqxml.xsd file in the aqxml.jar file

setEmailServerAddr(String)

public synchronized void setEmailServerAddr(java.lang.String ip_address)

Set the IP address of the Email server.

Parameters:

ip_address - IP address of email server

setLdapContext(DirContext)

public final synchronized void setLdapContext(oracle.AQ.xml.DirContext ctx) Set the LDAP context for the servlet. This context must be set in the init method of the servlet, if the IDAP messages may contain queue/topic aliases that are to be looked up in an LDAP server.

Parameters:

ctx - LDAP directory context

setSessionMaxInactiveTime(int)

protected synchronized void setSessionMaxInactiveTime(int secs) Set the maximum time a session can remain inactive. If the session remains inactive for more than this time, the session is destroyed and all operations that have not been committed are rolled back. By default this is set to 120 seconds

Parameters:

secs - time in seconds. This value cannot be set to less than 30secs

setStyleSheet(String, String)

public synchronized void setStyleSheet(java.lang.String type, java.lang.String href) Set StyleSheet for responses.

This can be called in the init method of the servlet to set a xml-stylesheet processing instruction for all XML responses sent by the servlet

Parameters:

type - stylesheet type (e.g: "text/xml")
href - stylesheet href (e.g: "http://www.aq.com/AQ/xslt.html" )

Throws:

AQxmlException - if invalid parameters specified

setStyleSheetProcessingInstr(String)

public void setStyleSheetProcessingInstr(java.lang.String proc_instr)

Set StyleSheet processing instruction for responses. This can be called in the init method of the servlet to set a xml-stylesheet processing instruction for all XML responses sent by the servlet

Parameters:

proc_instr - stylesheet processing instruction (e.g: "type="text/xsl"
href="http://www.oa.com/AQ/xslt23.html"" )

setUserCallback(AQxmlCallback)

public final void setUserCallback(AQxmlCallback callback)
setUserCallback - set the user callback.

The callback methods are invoked before and after AQ operations

Parameters:

callback - user callback


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 9i Topics