aa4mm.basic.coupling.shared_memory.utils.jmsBindings
Class jmsInput<I>

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

public class jmsInput<I>
extends java.lang.Object

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

Author:
Julien Siebert, Virginie Galtier Ciarletta

Field Summary
protected  java.lang.Class<I> classI
          The input data type
protected  java.lang.String name
          The name of the artefact.
private  javax.jms.TopicPublisher outputData
          JMS objects used to exchange data with other simulators : output channel producer
private  javax.jms.TopicSession topicSession
          JMS objects used to exchange data with other simulators : exchange channel
 
Constructor Summary
jmsInput(java.lang.Class<I> myClassI, java.lang.String myName)
           
 
Method Summary
 javax.jms.TopicPublisher getOutputData()
           
 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
 void post(javax.jms.ObjectMessage om)
          Post an object message to the JMS platform.
private  void setOutputData(javax.jms.TopicPublisher outputData)
           
private  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


outputData

private javax.jms.TopicPublisher outputData
JMS objects used to exchange data with other simulators : output channel producer


name

protected java.lang.String name
The name of the artefact.


classI

protected java.lang.Class<I> classI
The input data type

Constructor Detail

jmsInput

public jmsInput(java.lang.Class<I> myClassI,
                java.lang.String myName)
Method Detail

getOutputData

public javax.jms.TopicPublisher getOutputData()

setOutputData

private void setOutputData(javax.jms.TopicPublisher outputData)

getTopicSession

public javax.jms.TopicSession getTopicSession()

setTopicSession

private 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

post

public void post(javax.jms.ObjectMessage om)
          throws javax.jms.JMSException
Post an object message to the JMS platform.

Parameters:
om -
Throws:
javax.jms.JMSException