|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.JMSConnector
public class JMSConnector
The JMS Connector uses underlying implementations to access JMS based systems. Since the constructor is not defined in the JMS specification we actually need a java class for each JMS system.
| Field Summary | |
|---|---|
static String |
JMS_BROKER
|
static String |
JMS_MESSAGE_PROPERTY
The name under which the JMS Property is stored in the Entry |
static String |
JMS_PASSWORD
|
static String |
JMS_Q_MANAGER
|
static String |
JMS_SERVER_CHANNEL
|
static String |
JMS_SSL_CIPHER
|
static String |
JMS_SSL_SERVER_CHANNEL
|
static String |
JMS_SSL_USE_FLAG
|
static String |
JMS_USERNAME
|
static String |
MESSAGE_ATTRIBUTE
The attribute name used for plain text messages |
| Fields inherited from class com.ibm.di.connector.Connector |
|---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
| Fields inherited from interface com.ibm.di.server.CheckpointRestartInterface |
|---|
RESTART_AFTER, RESTART_BEFORE, RESTART_IN |
| Constructor Summary | |
|---|---|
JMSConnector()
Constructor for the JMSConnector object |
|
| Method Summary | |
|---|---|
String |
acknowledge()
Acknowledge all messages received in this topicSession. |
javax.jms.Message |
entry2message(Entry entry)
Convert an entry to a JMS message. |
Entry |
findEntry(SearchCriteria search)
Query the queue for specific messages. |
Entry |
getCheckpointInformation()
Returns the state information for the connector. |
String |
getIBMCharset(javax.jms.BytesMessage bytesmessage)
|
Entry |
getNextEntry()
Gets the nextEntry attribute of the JMSConnector object |
javax.jms.Queue |
getQueue()
Gets the sendQueue member of the JMSConnector object |
javax.jms.Queue |
getReadQueue()
Gets the readQueue member of the JMSConnector object |
javax.jms.Queue |
getSendQueue()
Gets the sendQueue member of the JMSConnector object |
javax.jms.Session |
getSession()
Gets the Session member of the JMSConnector object If topicSession non equals to null then return topicSession else return queueSession |
javax.jms.Topic |
getTopic()
Gets the topic member of the JMSConnector object |
String |
getVersion()
Return version information |
void |
initialize(Object o)
Initialize the Connector |
boolean |
isCheckpointRestartEnabled(int mode)
Components that support checkpoint/restart for a specific mode must return TRUE from this method. |
Entry |
message2entry(javax.jms.Message m)
Convert a JMS message to an entry. |
void |
onMessage(javax.jms.Message message)
Handles the arrived message |
void |
prepareForRestart(ALState state,
Entry restartInfo,
int restartPoint)
Notifies the connector of a restart situation. |
void |
putEntry(Entry entry)
Send an entry to the JMS server. |
Entry |
queryReply(Entry entry)
This method uses temporary queues/topics to implement the queryReply method. |
void |
reconnect()
Reconnect to the underlying data source. |
void |
selectEntries()
We only start the queue/topic listener thread if we are iterating |
void |
setFactory(javax.jms.ConnectionFactory factory)
Sets topicFactory or queueFactory members of the JMSConnector object If param is instanceof TopicConnectionFactory set topicFactory If param is instanceof QueueConnectionFactory set queueFactory |
void |
setReadQueue(javax.jms.Queue queue)
Sets the readQueue member of the JMSConnector object |
void |
setSendQueue(javax.jms.Queue queue)
Sets the sendQueue member of the JMSConnector object |
void |
setTopic(javax.jms.Topic topic)
Sets the topic member of the JMSConnector object |
void |
terminate()
Close the connection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
|---|
deleteEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, queryOperations, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer |
| Field Detail |
|---|
public static final String MESSAGE_ATTRIBUTE
public static final String JMS_MESSAGE_PROPERTY
public static final String JMS_BROKER
public static final String JMS_SERVER_CHANNEL
public static final String JMS_SSL_SERVER_CHANNEL
public static final String JMS_Q_MANAGER
public static final String JMS_SSL_USE_FLAG
public static final String JMS_SSL_CIPHER
public static final String JMS_USERNAME
public static final String JMS_PASSWORD
| Constructor Detail |
|---|
public JMSConnector()
| Method Detail |
|---|
public javax.jms.Topic getTopic()
public void setTopic(javax.jms.Topic topic)
topic - The topic valuepublic javax.jms.Queue getQueue()
public javax.jms.Queue getSendQueue()
public javax.jms.Queue getReadQueue()
public void setSendQueue(javax.jms.Queue queue)
queue - The sendQueue valuepublic void setReadQueue(javax.jms.Queue queue)
queue - The readQueue valuepublic javax.jms.Session getSession()
public void setFactory(javax.jms.ConnectionFactory factory)
factory - The TopicConnectionFactory or QueueConnectionFactory object
public Entry getNextEntry()
throws Exception
getNextEntry in interface ConnectorInterfacegetNextEntry in class ConnectorException - if the operation does not succeedConnector.selectEntries()public String acknowledge()
public void terminate()
terminate in interface ConnectorInterfaceterminate in class Connector
public void initialize(Object o)
throws Exception
initialize in interface ConnectorInterfaceinitialize in class Connectoro - The mode of the Connector
Exception - if the initialization fails
public void selectEntries()
throws Exception
selectEntries in interface ConnectorInterfaceselectEntries in class ConnectorException - if an exception occurs while listening for messages
public Entry findEntry(SearchCriteria search)
throws Exception
findEntry in interface ConnectorInterfacefindEntry in class Connectorsearch - The search criteria for message selection
Exception - Any JMS error
public void putEntry(Entry entry)
throws Exception
putEntry in interface ConnectorInterfaceputEntry in class Connectorentry - The entry to send
Exception - If the sending of a message fails
public Entry queryReply(Entry entry)
throws Exception
queryReply in interface ConnectorInterfacequeryReply in class Connectorentry - The data used in outgoing call
Exception - Any exceptions thrown by the connector's underlying classespublic void onMessage(javax.jms.Message message)
onMessage in interface javax.jms.MessageListenermessage - The received message
public javax.jms.Message entry2message(Entry entry)
throws Exception
entry - The entry to convert
Exception
public String getIBMCharset(javax.jms.BytesMessage bytesmessage)
throws javax.jms.JMSException
javax.jms.JMSException
public Entry message2entry(javax.jms.Message m)
throws Exception
m - The JMS message to convert
Exceptionpublic boolean isCheckpointRestartEnabled(int mode)
isCheckpointRestartEnabled in interface CheckpointRestartInterfacemode - The mode the connector runs in
ServerConstants
public Entry getCheckpointInformation()
throws Exception
getCheckpointInformation in interface CheckpointRestartInterfaceException
public void prepareForRestart(ALState state,
Entry restartInfo,
int restartPoint)
throws Exception
prepareForRestart in interface CheckpointRestartInterfacerestartInfo - The last entry object returned by the connector in the getCheckpointInformation methodstate - The ALState object for the AssemblyLinerestartPoint - The relative point where restarting is taking place (e.g. RESTART_BEFORE ...)
Exceptionpublic String getVersion()
getVersion in interface VersionInfoInterface
public void reconnect()
throws Exception
Connector
reconnect in class ConnectorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||