aa4mm.basic.coupling.shared_memory.utils.jmsBindings
Class jmsOutput<O>

java.lang.Object
  extended by aa4mm.basic.coupling.shared_memory.utils.jmsBindings.jmsOutput<O>
Type Parameters:
O -

public class jmsOutput<O>
extends java.lang.Object

This class represents an output binding to JMS. It provides a way to connect, and read messages into the JMS platform.

Since:
Darjeeling
Author:
Julien Siebert, Virginie Galtier

Field Summary
protected  java.lang.Class<O> classO
          The type of input data (read by the simulator)
private  javax.jms.TopicSubscriber inputData
          JMS objects used to exchange data with other simulators : input channel receiver
protected  java.lang.String name
          Name of the channel
private  javax.jms.TopicSession topicSession
          JMS objects used to exchange data with other simulators : exchange channel
 
Constructor Summary
jmsOutput(java.lang.Class<O> myClassO, java.lang.String myName)
           
 
Method Summary
 javax.jms.TopicSubscriber getInputData()
           
 javax.jms.TopicSession getTopicSession()
           
 void init(java.lang.String topicName, java.lang.String connectionFactoryName)
          Discover & initialize JMS objects by default the topicName = "shared_data" and the topic connection fa ctory name = "shared_data_topic_connection_factory" TODO add function parameters (such as 'guest') see below
 javax.jms.ObjectMessage read()
           
 void setInputData(javax.jms.TopicSubscriber inputData)
           
 void setTopicSession(javax.jms.TopicSession topicSession)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topicSession

private javax.jms.TopicSession topicSession
JMS objects used to exchange data with other simulators : exchange channel


inputData

private javax.jms.TopicSubscriber inputData
JMS objects used to exchange data with other simulators : input channel receiver


classO

protected java.lang.Class<O> classO
The type of input data (read by the simulator)


name

protected java.lang.String name
Name of the channel

Constructor Detail

jmsOutput

public jmsOutput(java.lang.Class<O> myClassO,
                 java.lang.String myName)
Method Detail

getInputData

public javax.jms.TopicSubscriber getInputData()

setInputData

public void setInputData(javax.jms.TopicSubscriber inputData)

getTopicSession

public javax.jms.TopicSession getTopicSession()

setTopicSession

public void setTopicSession(javax.jms.TopicSession topicSession)

init

public void init(java.lang.String topicName,
                 java.lang.String connectionFactoryName)
          throws javax.naming.NamingException,
                 javax.jms.JMSException
Discover & initialize JMS objects by default the topicName = "shared_data" and the topic connection fa ctory name = "shared_data_topic_connection_factory" TODO add function parameters (such as 'guest') see below

Throws:
javax.naming.NamingException
javax.jms.JMSException

read

public javax.jms.ObjectMessage read()
                             throws javax.jms.JMSException
Returns:
an object message from JMS
Throws:
javax.jms.JMSException