| Constructor and Description |
|---|
DefaultPublisherImpl()
Constructor DefaultPublisherImpl
|
DefaultPublisherImpl(java.lang.String username,
java.lang.String password,
java.lang.String brokerList,
java.lang.Boolean loadBalancing,
java.lang.Boolean sequential,
java.lang.Boolean selectorAtBroker)
Constructor DefaultPublisherImpl
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Method close
|
BytesMessage |
createBytesMessage()
Method createBytesMessage
|
MapMessage |
createMapMessage()
Method createMapMessage
|
Message |
createMessage()
Method createMessage
|
ObjectMessage |
createObjectMessage()
Method createObjectMessage
|
StreamMessage |
createStreamMessage()
Method createStreamMessage
|
TextMessage |
createTextMessage()
Method createTextMessage
|
protected void |
finalize()
Method finalize
|
boolean |
isClosed()
Method isClosed
|
void |
onException(JMSException ex)
Method onException
|
void |
open()
Method open
|
void |
publish(java.lang.String topic,
Message message)
Method publish
|
void |
publish(java.lang.String topic,
Message message,
int deliveryMode,
int priority,
long timeToLive)
Publish a message to the given topic.
|
void |
setExceptionListener(ExceptionListener listener)
Method setExceptionListener
|
public DefaultPublisherImpl()
throws MOMException
MOMExceptionpublic DefaultPublisherImpl(java.lang.String username,
java.lang.String password,
java.lang.String brokerList,
java.lang.Boolean loadBalancing,
java.lang.Boolean sequential,
java.lang.Boolean selectorAtBroker)
throws MOMException
username - the user namepassword - the passwordbrokerList - the coma separated broker URLs list (in the form [protocol://]hostname[:port])loadBalancing - if true, indicates that the client is willing to have a connect request re-directed to another broker within a clustersequential - if true, the broker list will be scanned sequentiallyselectorAtBroker - if true, selectors will be evaluated on the broker sideMOMExceptionpublic boolean isClosed()
public void setExceptionListener(ExceptionListener listener)
setExceptionListener in interface Publisherlistener - public BytesMessage createBytesMessage()
throws JMSException
createBytesMessage in interface PublisherJMSExceptionpublic MapMessage createMapMessage()
throws JMSException
createMapMessage in interface PublisherJMSExceptionpublic Message createMessage()
throws JMSException
createMessage in interface PublisherJMSExceptionpublic ObjectMessage createObjectMessage()
throws JMSException
createObjectMessage in interface PublisherJMSExceptionpublic StreamMessage createStreamMessage()
throws JMSException
createStreamMessage in interface PublisherJMSExceptionpublic TextMessage createTextMessage()
throws JMSException
createTextMessage in interface PublisherJMSExceptionpublic void onException(JMSException ex)
ex - public void open()
throws MOMException
MOMExceptionpublic void publish(java.lang.String topic,
Message message)
throws JMSException,
javax.naming.NamingException
public void publish(java.lang.String topic,
Message message,
int deliveryMode,
int priority,
long timeToLive)
throws JMSException,
javax.naming.NamingException
publish in interface Publishertopic - The String representation of the topicmessage - The Message object to publishdeliveryMode - The Message persistencepriority - The Message prioritytimeToLive - The Message time to liveJMSException - if JMS fails to publish the message due to some internal JMS error.javax.naming.NamingException - if there is a violation in the namespace policy.protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable