Class DummyMessageHandler
- java.lang.Object
-
- org.certificateservices.messages.pkimessages.manager.DummyMessageHandler
-
- All Implemented Interfaces:
MessageHandler
public class DummyMessageHandler extends java.lang.Object implements MessageHandler
-
-
Field Summary
Fields Modifier and Type Field Description static byte[]base64CertbooleanrevokeMessageRecievedstatic java.lang.StringSETTING_WAITTIME
-
Constructor Summary
Constructors Constructor Description DummyMessageHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Method called by service if the MessageHandler should disconnect from the MessageQueue server.voidconnect()Method called by service if the MessageHandler should connect to the MessageQueue server and start processing incoming calls.java.lang.ObjectgetConnectionFactory()Method returning the connection factory used to set-up the message queues.voidinit(java.util.Properties config, PKIMessageParser parser, MessageResponseCallback callback)Method called after instantiation and should check configuration and prepare everything for connection with the message queue server.booleanisConnected()Method returning if the handler is currently connected to the JMS broker.voidsendMessage(java.lang.String messageId, byte[] messageData)Method to send a message to the MQ server out queue.
-
-
-
Field Detail
-
revokeMessageRecieved
public boolean revokeMessageRecieved
-
SETTING_WAITTIME
public static final java.lang.String SETTING_WAITTIME
- See Also:
- Constant Field Values
-
base64Cert
public static byte[] base64Cert
-
-
Method Detail
-
init
public void init(java.util.Properties config, PKIMessageParser parser, MessageResponseCallback callback) throws MessageExceptionDescription copied from interface:MessageHandlerMethod called after instantiation and should check configuration and prepare everything for connection with the message queue server.- Specified by:
initin interfaceMessageHandler- Parameters:
config- the configuration.parser- the message parser configuration.callback- the callback interface where response messages are sent.- Throws:
MessageException- if configuration problems or other internal problems occurred.
-
connect
public void connect() throws MessageException, java.io.IOExceptionDescription copied from interface:MessageHandlerMethod called by service if the MessageHandler should connect to the MessageQueue server and start processing incoming calls.- Specified by:
connectin interfaceMessageHandler- Throws:
MessageException- if configuration problems or other internal problems occurred connecting to the MQ server.java.io.IOException- if communication problems occurred connecting from the message server.
-
sendMessage
public void sendMessage(java.lang.String messageId, byte[] messageData) throws MessageException, java.io.IOExceptionDescription copied from interface:MessageHandlerMethod to send a message to the MQ server out queue.- Specified by:
sendMessagein interfaceMessageHandler- Parameters:
messageId- the id of the message- Throws:
MessageException- if configuration problems or other internal problems occurred connecting to the MQ server.java.io.IOException- if communication problems occurred connecting and sending to the message server.
-
close
public void close() throws java.io.IOExceptionDescription copied from interface:MessageHandlerMethod called by service if the MessageHandler should disconnect from the MessageQueue server.- Specified by:
closein interfaceMessageHandler- Throws:
java.io.IOException- if communication problems occurred disconnecting from the message server.
-
getConnectionFactory
public java.lang.Object getConnectionFactory() throws MessageException, java.io.IOExceptionDescription copied from interface:MessageHandlerMethod returning the connection factory used to set-up the message queues. Used only for special purposes when not extending the implementing class. Required method for extending classes to provide the connection factory to use when connecting to the message server.- Specified by:
getConnectionFactoryin interfaceMessageHandler- Returns:
- a connection factory to use to set up the message processing environment, never null.
- Throws:
MessageException- if internal error or configuration problems occurred.java.io.IOException- if communication problems occurred with the message service.
-
isConnected
public boolean isConnected()
Description copied from interface:MessageHandlerMethod returning if the handler is currently connected to the JMS broker.- Specified by:
isConnectedin interfaceMessageHandler- Returns:
- true if connected.
-
-