public class SolJmsUtility
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static SolConnectionFactory |
createConnectionFactory()
Creates a Solace proprietary implementation of a ConnectionFactory.
|
static SolConnectionFactory |
createConnectionFactory(java.util.Hashtable<?,?> environment)
Creates a Solace proprietary implementation of a ConnectionFactory given an environment.
|
static SolConnectionFactory |
createConnectionFactory(java.lang.String host,
java.lang.String username,
java.lang.String password,
java.lang.String vpn,
java.util.Hashtable<?,?> environment)
Creates a Solace proprietary implementation of a ConnectionFactory given connection
parameters and an environment.
|
static SolQueue |
createQueue(java.lang.String queueName)
Creates a Solace proprietary implementation of a queue given a queue name.
|
static SolTopic |
createTopic(java.lang.String topicName)
Creates a Solace proprietary implementation of a topic given a topic name.
|
static SolXAConnectionFactory |
createXAConnectionFactory()
Creates a Solace proprietary implementation of an XAConnectionFactory.
|
static SolXAConnectionFactory |
createXAConnectionFactory(java.util.Hashtable<?,?> environment)
Creates a Solace proprietary implementation of an XAConnectionFactory given an environment.
|
static SolXAConnectionFactory |
createXAConnectionFactory(java.lang.String host,
java.lang.String username,
java.lang.String password,
java.lang.String vpn,
java.util.Hashtable<?,?> environment)
Creates a Solace proprietary implementation of an XAConnectionFactory given connection
parameters and an environment.
|
static java.lang.String |
dumpMessage(javax.jms.Message msg)
Produces a human-readable dump of the message properties and its contents
(can be quite large).
|
static javax.jms.Message |
fromByteArray(byte[] data)
Converts a byte array representing a serialized JMS Message into
a JMS Message.
|
static long |
getMessageSize(javax.jms.Message msg)
Gets the encoded size of the message payload in bytes.
|
static SolReferenceableDelegate |
getReferenceableDelegate()
Gets the Referenceable delegate for ConnectionFactorys, Topics, and Queues.
|
static void |
setReferenceableDelegate(SolReferenceableDelegate referenceableDelegate)
Sets the Referenceable delegate for ConnectionFactorys, Topics, and Queues.
|
static byte[] |
toByteArray(javax.jms.Message msg)
Serializes a JMS Message into a byte array.
|
public static java.lang.String dumpMessage(javax.jms.Message msg)
The textual dump includes JMS message fields and properties, followed by Solace-message-specific attributes as reported by the underlying messaging provider.
msg
- A Solace JMS Message instance.String
representation of the message, to be used
for debugging.public static long getMessageSize(javax.jms.Message msg) throws javax.jms.JMSException
javax.jms.IllegalStateException
for a message created using
the local javax.jms.Session
.msg
- The message to get the payload size of.javax.jms.JMSException
- on errorpublic static byte[] toByteArray(javax.jms.Message msg) throws javax.jms.JMSException
msg
- The message to be serialized.javax.jms.JMSException
- If conversion fails.public static javax.jms.Message fromByteArray(byte[] data) throws javax.jms.JMSException
reset
puts their bodies in read-only mode.data
- The serialized JMS Message.javax.jms.JMSException
- If conversion fails.public static SolConnectionFactory createConnectionFactory() throws java.lang.Exception
java.lang.Exception
- on errorpublic static SolConnectionFactory createConnectionFactory(java.util.Hashtable<?,?> environment) throws java.lang.Exception
environment
- Environment tablejava.lang.Exception
- on errorpublic static SolConnectionFactory createConnectionFactory(java.lang.String host, java.lang.String username, java.lang.String password, java.lang.String vpn, java.util.Hashtable<?,?> environment) throws java.lang.Exception
host
- Appliance host to be used for any connections created from this factory.username
- Appliance username to be used for any connections created from this factory.password
- Appliance password to be used for any connections created from this factory.vpn
- Appliance vpn to be used for any connections created from this factory.environment
- Environment tablejava.lang.Exception
- on errorpublic static SolXAConnectionFactory createXAConnectionFactory() throws java.lang.Exception
java.lang.Exception
- on errorpublic static SolXAConnectionFactory createXAConnectionFactory(java.util.Hashtable<?,?> environment) throws java.lang.Exception
environment
- Environment tablejava.lang.Exception
- on errorpublic static SolXAConnectionFactory createXAConnectionFactory(java.lang.String host, java.lang.String username, java.lang.String password, java.lang.String vpn, java.util.Hashtable<?,?> environment) throws java.lang.Exception
host
- Appliance host to be used for any connections created from this factory.username
- Appliance username to be used for any connections created from this factory.password
- Appliance password to be used for any connections created from this factory.vpn
- Appliance vpn to be used for any connections created from this factory.environment
- Environment tablejava.lang.Exception
- on errorpublic static SolTopic createTopic(java.lang.String topicName)
topicName
- parameterpublic static SolQueue createQueue(java.lang.String queueName)
queueName
- parameterpublic static void setReferenceableDelegate(SolReferenceableDelegate referenceableDelegate)
Referenceable.getReference()
is called on a ConnectionFactory, Topic, or Queue the delegate will be called
to return a Reference
.referenceableDelegate
- The referenceable delegatepublic static SolReferenceableDelegate getReferenceableDelegate()
Referenceable.getReference()
is called on a ConnectionFactory, Topic, or Queue the delegate will be called
to return a Reference
.Copyright 2004-2024 Solace Corporation. All rights reserved.