eu.semaine.components.meta
Class MetaMessenger
java.lang.Object
eu.semaine.jms.IOBase
eu.semaine.components.meta.MetaMessenger
public class MetaMessenger
- extends IOBase
Communication between a component and the
system manager, transporting meta messages about the state of the
component and of the system.
- Author:
- marc
Constructor Summary |
MetaMessenger(java.lang.String componentName)
Create a meta messenger for the component with the given name,
which is to communicate with the global default JMS server. |
MetaMessenger(java.lang.String jmsUrl,
java.lang.String jmsUser,
java.lang.String jmsPassword,
java.lang.String componentName)
Create a meta messenger for the component with the given name, which is to
communicate with the JMS server given in the arguments. |
Methods inherited from class eu.semaine.jms.IOBase |
createConnection, getConnection, getConnection, getConnectionStatus, getJMSPassword, getJMSUrl, getJMSUser, getSession, getTopic, getTopicName, isEmbeddedBroker, startConnection, useEmbeddedBroker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPONENT_NAME
public static final java.lang.String COMPONENT_NAME
- See Also:
- Constant Field Values
COMPONENT_STATE
public static final java.lang.String COMPONENT_STATE
- See Also:
- Constant Field Values
COMPONENT_STATE_DETAILS
public static final java.lang.String COMPONENT_STATE_DETAILS
- See Also:
- Constant Field Values
RECEIVE_TOPICS
public static final java.lang.String RECEIVE_TOPICS
- See Also:
- Constant Field Values
SEND_TOPICS
public static final java.lang.String SEND_TOPICS
- See Also:
- Constant Field Values
IS_INPUT
public static final java.lang.String IS_INPUT
- See Also:
- Constant Field Values
IS_OUTPUT
public static final java.lang.String IS_OUTPUT
- See Also:
- Constant Field Values
LAST_SEEN_ALIVE
public static final java.lang.String LAST_SEEN_ALIVE
- See Also:
- Constant Field Values
AVERAGE_ACT_TIME
public static final java.lang.String AVERAGE_ACT_TIME
- See Also:
- Constant Field Values
AVERAGE_REACT_TIME
public static final java.lang.String AVERAGE_REACT_TIME
- See Also:
- Constant Field Values
AVERAGE_TRANSMIT_TIME
public static final java.lang.String AVERAGE_TRANSMIT_TIME
- See Also:
- Constant Field Values
TOTAL_MESSAGES_RECEIVED
public static final java.lang.String TOTAL_MESSAGES_RECEIVED
- See Also:
- Constant Field Values
SYSTEM_READY
public static final java.lang.String SYSTEM_READY
- See Also:
- Constant Field Values
SYSTEM_READY_TIME
public static final java.lang.String SYSTEM_READY_TIME
- See Also:
- Constant Field Values
PING
public static final java.lang.String PING
- See Also:
- Constant Field Values
REPORT_TOPICS
public static final java.lang.String REPORT_TOPICS
- See Also:
- Constant Field Values
TIMEOUT_PERIOD
public static final long TIMEOUT_PERIOD
- See Also:
- Constant Field Values
MetaMessenger
public MetaMessenger(java.lang.String componentName)
throws JMSException
- Create a meta messenger for the component with the given name,
which is to communicate with the global default JMS server.
- Parameters:
componentName
- the name of the component that this meta messenger belongs to.
- Throws:
JMSException
- if the communication with the middleware cannot be established
MetaMessenger
public MetaMessenger(java.lang.String jmsUrl,
java.lang.String jmsUser,
java.lang.String jmsPassword,
java.lang.String componentName)
throws JMSException
- Create a meta messenger for the component with the given name, which is to
communicate with the JMS server given in the arguments.
- Parameters:
jmsUrl
- the url where to contact the JMS serverjmsUser
- the username to use (can be null)jmsPassword
- the password to use (can be null)componentName
- the name of the component that this meta messenger belongs to.
- Throws:
JMSException
- if the communication with the middleware cannot be established
IamAlive
public void IamAlive()
reportTopics
public void reportTopics(java.util.List<Receiver> receivers,
java.util.List<Sender> senders,
boolean isInput,
boolean isOutput)
throws JMSException
- Throws:
JMSException
reportState
public void reportState(Component.State state)
throws JMSException
- Throws:
JMSException
reportState
public void reportState(Component.State state,
java.lang.Object... details)
throws JMSException
- Throws:
JMSException
onMessage
public void onMessage(Message m)
isSystemReady
public boolean isSystemReady()
getTime
public long getTime()
- Get the current time in common, normalised time space.
Processes should use only this method for determining the time.
The value is counting milliseconds since some arbitrary point
in time; therefore, the absolute time is not informative,
but differences of time values are.
- Returns:
statistics
public MetaMessenger.Statistics statistics()