org.apache.airavata.wsmg.client
Class WseMsgBrokerClient
java.lang.Object
org.apache.airavata.wsmg.client.WseMsgBrokerClient
- All Implemented Interfaces:
- MessageBrokerClient
public class WseMsgBrokerClient
- extends Object
- implements MessageBrokerClient
|
Method Summary |
static org.apache.axis2.addressing.EndpointReference |
createEndpointReference(String brokerURL,
String topic)
|
org.apache.axis2.addressing.EndpointReference |
createPullMsgBox(String msgBoxServerLoc)
|
org.apache.axis2.addressing.EndpointReference |
createPullMsgBox(String msgBoxLocation,
long timeout)
|
String |
deleteMsgBox(org.apache.axis2.addressing.EndpointReference msgBoxEpr,
long timeout)
|
String[] |
getConsumerServiceEndpointReference()
|
long |
getTimeoutInMilliSeconds()
|
long |
getTimeOutInMilliSeconds()
|
void |
init(String brokerLocation)
May be we just use a constructor here |
void |
publish(String topic,
org.apache.axiom.om.OMElement message)
|
void |
publish(String topic,
String plainText)
|
void |
setTimeoutInMilliSeconds(long timeout)
|
void |
setTimeOutInMilliSeconds(long timeout)
|
void |
shutdownConsumerService()
This method can be used to shutdown the consumer server started |
String[] |
startConsumerService(int port,
ConsumerNotificationHandler handler)
|
MessagePuller |
startPullingEventsFromMsgBox(org.apache.axis2.addressing.EndpointReference msgBoxEpr,
NotificationHandler handler,
long interval,
long timeout)
|
MessagePuller |
startPullingFromExistingMsgBox(org.apache.axis2.addressing.EndpointReference msgBoxAddr,
NotificationHandler handler,
long interval,
long timeout)
|
void |
stopPullingEventsFromMsgBox(MessagePuller msgPuller)
|
String |
subscribe(org.apache.axis2.addressing.EndpointReference eventSinkLocation,
String topicExpression,
String xpathExpression)
|
String |
subscribe(org.apache.axis2.addressing.EndpointReference eventSinkLocation,
String topicExpression,
String xpathExpression,
long expireTime)
|
String |
subscribe(String eventSinkLocation,
String topicExpression,
String xpathExpression)
|
String |
subscribeMsgBox(org.apache.axis2.addressing.EndpointReference msgBoxEpr,
String topicExpression,
String xpathExpression,
long expireTime)
|
String |
subscribeMsgBox(String brokerService,
org.apache.axis2.addressing.EndpointReference msgBoxEpr,
String topic,
String xpath)
|
boolean |
unSubscribe(String subscriptionId)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timeoutInMilliSeconds
protected long timeoutInMilliSeconds
notificationProducer
protected NotificationProducer notificationProducer
consumerServerHandler
protected ConsumerServerHandler consumerServerHandler
factory
protected static final org.apache.axiom.om.OMFactory factory
xs
protected ConsumerServer xs
msgboxHandler
protected MsgboxHandler msgboxHandler
WseMsgBrokerClient
public WseMsgBrokerClient()
createEndpointReference
public static org.apache.axis2.addressing.EndpointReference createEndpointReference(String brokerURL,
String topic)
init
public void init(String brokerLocation)
- Description copied from interface:
MessageBrokerClient
- May be we just use a constructor here
- Specified by:
init in interface MessageBrokerClient
publish
public void publish(String topic,
String plainText)
throws MsgBrokerClientException
- Specified by:
publish in interface MessageBrokerClient
- Throws:
MsgBrokerClientException
publish
public void publish(String topic,
org.apache.axiom.om.OMElement message)
throws MsgBrokerClientException
- Specified by:
publish in interface MessageBrokerClient
- Throws:
MsgBrokerClientException
subscribe
public String subscribe(String eventSinkLocation,
String topicExpression,
String xpathExpression)
throws MsgBrokerClientException
- Specified by:
subscribe in interface MessageBrokerClient
- Returns:
-
- Throws:
MsgBrokerClientException
subscribe
public String subscribe(org.apache.axis2.addressing.EndpointReference eventSinkLocation,
String topicExpression,
String xpathExpression)
throws MsgBrokerClientException
- Specified by:
subscribe in interface MessageBrokerClient
- Throws:
MsgBrokerClientException
subscribe
public String subscribe(org.apache.axis2.addressing.EndpointReference eventSinkLocation,
String topicExpression,
String xpathExpression,
long expireTime)
throws MsgBrokerClientException
- Specified by:
subscribe in interface MessageBrokerClient
expireTime - with -1, it never expires
- Returns:
-
- Throws:
MsgBrokerClientException
unSubscribe
public boolean unSubscribe(String subscriptionId)
throws MsgBrokerClientException
- Specified by:
unSubscribe in interface MessageBrokerClient
- Returns:
-
- Throws:
MsgBrokerClientException
getTimeoutInMilliSeconds
public long getTimeoutInMilliSeconds()
setTimeoutInMilliSeconds
public void setTimeoutInMilliSeconds(long timeout)
startConsumerService
public String[] startConsumerService(int port,
ConsumerNotificationHandler handler)
throws MsgBrokerClientException
- Specified by:
startConsumerService in interface MessageBrokerClient
- Returns:
-
- Throws:
MsgBrokerClientException
shutdownConsumerService
public void shutdownConsumerService()
- Description copied from interface:
MessageBrokerClient
- This method can be used to shutdown the consumer server started
- Specified by:
shutdownConsumerService in interface MessageBrokerClient
getConsumerServiceEndpointReference
public String[] getConsumerServiceEndpointReference()
- Specified by:
getConsumerServiceEndpointReference in interface MessageBrokerClient
- Returns:
setTimeOutInMilliSeconds
public void setTimeOutInMilliSeconds(long timeout)
getTimeOutInMilliSeconds
public long getTimeOutInMilliSeconds()
subscribeMsgBox
public String subscribeMsgBox(String brokerService,
org.apache.axis2.addressing.EndpointReference msgBoxEpr,
String topic,
String xpath)
throws MsgBrokerClientException
- Specified by:
subscribeMsgBox in interface MessageBrokerClient
- Returns:
-
- Throws:
MsgBrokerClientException
subscribeMsgBox
public String subscribeMsgBox(org.apache.axis2.addressing.EndpointReference msgBoxEpr,
String topicExpression,
String xpathExpression,
long expireTime)
throws MsgBrokerClientException
- Specified by:
subscribeMsgBox in interface MessageBrokerClient
expireTime - with -1, it never expires
- Returns:
-
- Throws:
MsgBrokerClientException
createPullMsgBox
public org.apache.axis2.addressing.EndpointReference createPullMsgBox(String msgBoxLocation,
long timeout)
throws MsgBrokerClientException
- Specified by:
createPullMsgBox in interface MessageBrokerClient
- Returns:
-
- Throws:
MsgBrokerClientException
createPullMsgBox
public org.apache.axis2.addressing.EndpointReference createPullMsgBox(String msgBoxServerLoc)
throws MsgBrokerClientException
- Specified by:
createPullMsgBox in interface MessageBrokerClient
- Returns:
-
- Throws:
MsgBrokerClientException
startPullingEventsFromMsgBox
public MessagePuller startPullingEventsFromMsgBox(org.apache.axis2.addressing.EndpointReference msgBoxEpr,
NotificationHandler handler,
long interval,
long timeout)
throws MsgBrokerClientException
- Specified by:
startPullingEventsFromMsgBox in interface MessageBrokerClient
- Returns:
-
- Throws:
MsgBrokerClientException
startPullingFromExistingMsgBox
public MessagePuller startPullingFromExistingMsgBox(org.apache.axis2.addressing.EndpointReference msgBoxAddr,
NotificationHandler handler,
long interval,
long timeout)
throws MsgBrokerClientException
- Specified by:
startPullingFromExistingMsgBox in interface MessageBrokerClient
- Returns:
-
- Throws:
MsgBrokerClientException
deleteMsgBox
public String deleteMsgBox(org.apache.axis2.addressing.EndpointReference msgBoxEpr,
long timeout)
throws MsgBrokerClientException
- Throws:
MsgBrokerClientException
stopPullingEventsFromMsgBox
public void stopPullingEventsFromMsgBox(MessagePuller msgPuller)
- Specified by:
stopPullingEventsFromMsgBox in interface MessageBrokerClient
Copyright © 2011-2012 The Apache Software Foundation. All Rights Reserved.