org.mactor.brokers.http
Class HttpMessageBroker
java.lang.Object
org.mactor.brokers.AbstractMessageBroker
org.mactor.brokers.http.HttpMessageBroker
- All Implemented Interfaces:
- MessageBroker
public class HttpMessageBroker
- extends AbstractMessageBroker
A simple message broker that supports posting/receinving XML messages over
HTTP (optionally with a response)
- Author:
- Lars Ivar Almli
- See Also:
MessageBroker
Method Summary |
protected void |
onFirstSubscribe(java.lang.String channel)
|
protected void |
onLastSubscribe(java.lang.String channel)
|
void |
publish(java.lang.String channel,
Message message)
Publish a message to a channel |
Message |
publishWithResponse(java.lang.String channel,
Message message)
Publish a message and expect a reponse (when dealing with synchrounous
protcols) |
Message |
sendMessage(java.lang.String endPoint,
java.lang.String method,
Message message,
boolean expectResponse,
java.lang.String username,
java.lang.String password)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpMessageBroker
public HttpMessageBroker(MessageBrokersConfig.MessageBrokerConfig config)
publish
public void publish(java.lang.String channel,
Message message)
throws MactorException
- Description copied from interface:
MessageBroker
- Publish a message to a channel
- Parameters:
channel
- the channelmessage
- the message
- Throws:
MactorException
- if some problem occures (this will cause the test to fail)
publishWithResponse
public Message publishWithResponse(java.lang.String channel,
Message message)
throws MactorException
- Description copied from interface:
MessageBroker
- Publish a message and expect a reponse (when dealing with synchrounous
protcols)
- Parameters:
channel
- the channelmessage
- the message
- Returns:
- the response message
- Throws:
MactorException
- if some problem occures (this will cause the test to fail)
onFirstSubscribe
protected void onFirstSubscribe(java.lang.String channel)
throws MactorException
- Specified by:
onFirstSubscribe
in class AbstractMessageBroker
- Throws:
MactorException
onLastSubscribe
protected void onLastSubscribe(java.lang.String channel)
throws MactorException
- Specified by:
onLastSubscribe
in class AbstractMessageBroker
- Throws:
MactorException
sendMessage
public Message sendMessage(java.lang.String endPoint,
java.lang.String method,
Message message,
boolean expectResponse,
java.lang.String username,
java.lang.String password)
throws MactorException
- Throws:
MactorException
Copyright © 2008. All Rights Reserved.