public class

AQClient

extends Object
java.lang.Object
   ↳ org.mule.modules.oracle.client.AQClient

Class Overview

Class containing all Oracle AQ-related operations.

Summary

Constants
String BE_CONNECTION_ERROR
String BUSINESS_EVENTS_TOPIC_NAME The name of the topic that receives Business Events.
String DRIVER The Oracle driver to use.
String QUEUE_OWNER The Oracle DB user that owns the Business Events topic and XML Gateway Outbound queue.
String XML_GATEWAY_CONNECTION_ERROR
String XML_GATEWAY_OUTBOUND_QUEUE_NAME The name of the topic that receives XML Gateway Outbound messages.
Fields
private static final XMLInputFactory factory The XMLInputFactory used to convert Strings to XML.
private String host The host where the Oracle DB is running.
private static final Logger logger Logger for this class.
private boolean loop Set to true in production, false when testing.
private String password The password to be used to connect to the Oracle DB.
private int port The port where the Oracle DB is listening.
private QueueConnection queueConnection The connection used to retrieve XML Gateway Outbound messages.
private String sid The name of the database.
private TopicConnection topicConnection The connection used to retrieve Business Events.
private String user The username to be used to connect to the Oracle DB.
Public Constructors
AQClient(String user, String password, String host, int port, String sid, boolean loop)
Constructs an AQClient.
Public Methods
void businessEvents(SourceCallback callback)
Subscribes to the {@value #BUSINESS_EVENTS_TOPIC_NAME} topic and retrieves any business event enqueued to it.
void shutdown()
Closes all open connections and disables looping, so the infinite cycle from subscriptions is cut.
XMLStreamReader stringToXmlStreamReader(String xml)
void xmlGatewayOutbound(SourceCallback callback)
Subscribes to the {@value #XML_GATEWAY_OUTBOUND_QUEUE_NAME} queue and retrieves any messages enqueued to it.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

private static final String BE_CONNECTION_ERROR

Constant Value: "Error creating connection and subscriber to Business Events topic"

private static final String BUSINESS_EVENTS_TOPIC_NAME

The name of the topic that receives Business Events.

Constant Value: "WF_JMS_JMS_OUT"

private static final String DRIVER

The Oracle driver to use.

Constant Value: "thin"

private static final String QUEUE_OWNER

The Oracle DB user that owns the Business Events topic and XML Gateway Outbound queue.

Constant Value: "APPLSYS"

private static final String XML_GATEWAY_CONNECTION_ERROR

Constant Value: "Error creating connection and subscriber to XML Gateway Outbound queue"

private static final String XML_GATEWAY_OUTBOUND_QUEUE_NAME

The name of the topic that receives XML Gateway Outbound messages.

Constant Value: "ECX_OUTBOUND"

Fields

private static final XMLInputFactory factory

The XMLInputFactory used to convert Strings to XML.

private String host

The host where the Oracle DB is running.

private static final Logger logger

Logger for this class.

private boolean loop

Set to true in production, false when testing. This prevents infinite loops when subscribing to queues/topics.

private String password

The password to be used to connect to the Oracle DB.

private int port

The port where the Oracle DB is listening.

private QueueConnection queueConnection

The connection used to retrieve XML Gateway Outbound messages.

private String sid

The name of the database.

private TopicConnection topicConnection

The connection used to retrieve Business Events.

private String user

The username to be used to connect to the Oracle DB.

Public Constructors

public AQClient (String user, String password, String host, int port, String sid, boolean loop)

Constructs an AQClient.

Parameters
user The username to be used to connect to the Oracle DB.
password The password to be used to connect to the Oracle DB.
host The host where the Oracle DB is running.
port The port where the Oracle DB is listening.
sid The name of the database.
loop Set to true in production, false when testing. This prevents infinite loops when subscribing to queues/topics.

Public Methods

public void businessEvents (SourceCallback callback)

Subscribes to the {@value #BUSINESS_EVENTS_TOPIC_NAME} topic and retrieves any business event enqueued to it.

Parameters
callback The SourceCallback callback to call when a business event is retrieved.

public void shutdown ()

Closes all open connections and disables looping, so the infinite cycle from subscriptions is cut.

public XMLStreamReader stringToXmlStreamReader (String xml)

Parameters
xml
Throws
XMLStreamException

public void xmlGatewayOutbound (SourceCallback callback)

Subscribes to the {@value #XML_GATEWAY_OUTBOUND_QUEUE_NAME} queue and retrieves any messages enqueued to it.

Parameters
callback The SourceCallback callback to call when a messages is retrieved.