public class SEHRMessaging
extends java.lang.Object
Constructor and Description |
---|
SEHRMessaging() |
SEHRMessaging(SEHRConfigurationObject sco) |
SEHRMessaging(SEHRConfigurationObject sco,
java.lang.String brokerUrl,
java.lang.String brokerUser,
java.lang.String brokerPassword) |
Modifier and Type | Method and Description |
---|---|
void |
closeSession() |
org.apache.activemq.ActiveMQConnection |
configureAMQConnection(java.lang.String brokerUrl,
java.lang.String brokerUser,
java.lang.String brokerPassword) |
javax.jms.MessageConsumer |
createConsumer(java.lang.String respQueue) |
static javax.jms.MapMessage |
createSEHRMessageHeader(javax.jms.Session session,
SEHRMessageProperties pXnet)
Prepare a message for sending over locally (inside a zone) or over XNET.
|
javax.jms.Session |
getSession() |
javax.jms.Session |
initAutoAckSession(boolean transacted) |
java.util.Map<java.lang.String,java.lang.Object> |
pingZoneService(int zid,
long timeout) |
void |
sendMessage(javax.jms.MapMessage mMsg,
java.util.Map<java.lang.String,java.lang.Object> reqDest) |
void |
setAMQConnection(org.apache.activemq.ActiveMQConnection amqCon)
Set existing AMQ connection handler for the session.
|
static boolean |
verifySEHRMessageHash(java.lang.String sHash,
org.ifeth.sehr.intrasec.entities.DefModule defModule)
Verify a hash of a module against a moule entity.
|
public SEHRMessaging()
public SEHRMessaging(SEHRConfigurationObject sco)
public SEHRMessaging(SEHRConfigurationObject sco, java.lang.String brokerUrl, java.lang.String brokerUser, java.lang.String brokerPassword)
public org.apache.activemq.ActiveMQConnection configureAMQConnection(java.lang.String brokerUrl, java.lang.String brokerUser, java.lang.String brokerPassword)
public javax.jms.Session initAutoAckSession(boolean transacted) throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.Session getSession()
public void closeSession() throws javax.jms.JMSException
javax.jms.JMSException
public void setAMQConnection(org.apache.activemq.ActiveMQConnection amqCon)
If an AMQ connection already exists use this method. Call also
initAutoAckSession(boolean)
for a session.
amqCon
- public java.util.Map<java.lang.String,java.lang.Object> pingZoneService(int zid, long timeout)
public javax.jms.MessageConsumer createConsumer(java.lang.String respQueue) throws javax.jms.JMSException
javax.jms.JMSException
public void sendMessage(javax.jms.MapMessage mMsg, java.util.Map<java.lang.String,java.lang.Object> reqDest) throws javax.jms.JMSException
javax.jms.JMSException
public static javax.jms.MapMessage createSEHRMessageHeader(javax.jms.Session session, SEHRMessageProperties pXnet) throws javax.jms.JMSException
The SEHR messaging bus XNET requires some important headers for EIS processing like message routing etc.
Use this class for all SEHR related messaging, not only 'SEHR#XNET'.
session
- pXnet
- javax.jms.JMSException
public static boolean verifySEHRMessageHash(java.lang.String sHash, org.ifeth.sehr.intrasec.entities.DefModule defModule)
Use case: A message has been received from an known or unknown source. A developer on the site of the receiver can load the requested module (app) information by the given 'AppToken' (the PIK) from the 'IFETH App Store' and check the 'official' (registered) application against the hash given by the message. If the verification passed ('true'), the app that sent the message is 'known' and 'registered'. If not, it is the descision of the developer (receivers site) to process messages from unknown/unregistered apps.
sHash
- defModule
-