public class IMSCalloutControlAreaFactory
extends java.lang.Object
The following code fragment shows how to use IMSCalloutControlAreaFactory
to obtain and use a IMSCalloutControlArea
object.
IMSQueueConnectionFactory jmsConnectionFactory = new IMSQueueConnectionFactory(); QueueConnection jmsConnection = null; QueueSession jmsQueueSession = null; Queue jmsQueue = null; QueueRequestor jmsQueueRequestor = null; try { jmsConnectionFactory.setTimeout(1000); //Set 10 second timeout jmsConnectionFactory.setResponseAreaLength(128000); //Allocate 128K response area jmsConnection = jmsConnectionFactory.createQueueConnection(); jmsQueueSession = jmsConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); jmsQueue = jmsQueueSession.createQueue("OTMDEST1"); jmsQueueRequestor = new QueueRequestor(jmsQueueSession, jmsQueue); BytesMessage sendMsg = jmsQueueSession.createBytesMessage(); IMSCalloutControlAreaFactory imsControlAreaFactory = new IMSCalloutControlAreaFactory(); IMSCalloutControlArea imsControlArea = imsControlAreaFactory.createIMSCalloutControlArea(); imsControlArea.addControlDataItem("MSG", "My Message"); sendMsg.writeObject(imsControlArea); BytesMessage replyMsg = (BytesMessage)jmsQueueRequestor.request(sendMsg); System.out.println("Received message: "+replyMsg.readUTF()); } catch (Exception e) { e.printStackTrace(); }
Constructor and Description |
---|
IMSCalloutControlAreaFactory() |
Modifier and Type | Method and Description |
---|---|
static IMSCalloutControlArea |
createIMSCalloutControlArea()
Creates a new IMSCalloutControlArea object.
|
public static IMSCalloutControlArea createIMSCalloutControlArea()