Class EmbeddedJMSResource
java.lang.Object
org.junit.rules.ExternalResource
org.apache.activemq.artemis.junit.EmbeddedJMSResource
- All Implemented Interfaces:
EmbeddedJMSOperations<EmbeddedJMSResource>, org.junit.rules.TestRule
@Deprecated
public class EmbeddedJMSResource
extends org.junit.rules.ExternalResource
implements EmbeddedJMSOperations<EmbeddedJMSResource>
Deprecated.
Deprecated in favor of EmbeddedActiveMQResource. Since Artemis 2.0 all JMS specific broker management classes,
interfaces, and methods have been deprecated in favor of their more general counter-parts. A JUnit Rule that embeds
an ActiveMQ Artemis JMS server into a test. This JUnit Rule is designed to simplify using embedded servers in unit
tests. Adding the rule to a test will startup an embedded JMS server, which can then be used by client applications.
public class SimpleTest {
@Rule
public EmbeddedJMSResource server = new EmbeddedJMSResource();
@Test
public void testSomething() throws Exception {
// Use the embedded server here
}
}
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Create a default EmbeddedJMSResourceEmbeddedJMSResource(boolean useNetty) Deprecated.Create a default EmbeddedJMSResourceEmbeddedJMSResource(int serverId) Deprecated.Create a default EmbeddedJMSResource with the specified server idEmbeddedJMSResource(String filename) Deprecated.Create an EmbeddedJMSResource with the specified configuration fileEmbeddedJMSResource(String serverConfigurationFileName, String jmsConfigurationFileName) Deprecated.Create an EmbeddedJMSResource with the specified configuration fileEmbeddedJMSResource(Configuration configuration, JMSConfiguration jmsConfiguration) Deprecated.Create an EmbeddedJMSResource with the specified configurations -
Method Summary
Modifier and TypeMethodDescriptionaddAcceptor(String name, String uri) Deprecated.protected voidafter()Deprecated.Stop the embedded ActiveMQ Brokerprotected voidbefore()Deprecated.Start the embedded ActiveMQ Brokerjavax.jms.BytesMessageDeprecated.javax.jms.MapMessageDeprecated.javax.jms.BytesMessagecreateMessage(byte[] body) Deprecated.javax.jms.BytesMessagecreateMessage(byte[] body, Map<String, Object> properties) Deprecated.javax.jms.ObjectMessagecreateMessage(Serializable body) Deprecated.javax.jms.ObjectMessagecreateMessage(Serializable body, Map<String, Object> properties) Deprecated.javax.jms.TextMessagecreateMessage(String body) Deprecated.javax.jms.TextMessagecreateMessage(String body, Map<String, Object> properties) Deprecated.javax.jms.MapMessagecreateMessage(Map<String, Object> body) Deprecated.javax.jms.MapMessageDeprecated.javax.jms.ObjectMessageDeprecated.javax.jms.StreamMessageDeprecated.javax.jms.TextMessageDeprecated.org.apache.activemq.artemis.core.server.QueuegetDestinationQueue(String destinationName) Deprecated.Deprecated.longgetMessageCount(String destinationName) Deprecated.Deprecated.List<org.apache.activemq.artemis.core.server.Queue> getTopicQueues(String topicName) Deprecated.getVmURL()Deprecated.javax.jms.BytesMessagepeekBytesMessage(String destinationName) Deprecated.javax.jms.MapMessagepeekMapMessage(String destinationName) Deprecated.javax.jms.MessagepeekMessage(String destinationName) Deprecated.javax.jms.ObjectMessagepeekObjectMessage(String destinationName) Deprecated.javax.jms.StreamMessagepeekStreamMessage(String destinationName) Deprecated.javax.jms.TextMessagepeekTextMessage(String destinationName) Deprecated.javax.jms.BytesMessagepushMessage(String destinationName, byte[] body) Deprecated.javax.jms.ObjectMessagepushMessage(String destinationName, Serializable body) Deprecated.javax.jms.TextMessagepushMessage(String destinationName, String body) Deprecated.javax.jms.MapMessagepushMessage(String destinationName, Map<String, Object> body) Deprecated.voidpushMessage(String destinationName, javax.jms.Message message) Deprecated.javax.jms.BytesMessagepushMessageWithProperties(String destinationName, byte[] body, Map<String, Object> properties) Deprecated.javax.jms.ObjectMessagepushMessageWithProperties(String destinationName, Serializable body, Map<String, Object> properties) Deprecated.javax.jms.TextMessageDeprecated.javax.jms.MapMessagepushMessageWithProperties(String destinationName, Map<String, Object> body, Map<String, Object> properties) Deprecated.static voidsetMessageProperties(javax.jms.Message message, Map<String, Object> properties) Deprecated.voidstart()Deprecated.voidstop()Deprecated.Methods inherited from class org.junit.rules.ExternalResource
apply
-
Constructor Details
-
EmbeddedJMSResource
public EmbeddedJMSResource()Deprecated.Create a default EmbeddedJMSResource -
EmbeddedJMSResource
public EmbeddedJMSResource(boolean useNetty) Deprecated.Create a default EmbeddedJMSResource -
EmbeddedJMSResource
public EmbeddedJMSResource(int serverId) Deprecated.Create a default EmbeddedJMSResource with the specified server id -
EmbeddedJMSResource
Deprecated.Create an EmbeddedJMSResource with the specified configurations- Parameters:
configuration- ActiveMQServer configurationjmsConfiguration- JMSServerManager configuration
-
EmbeddedJMSResource
Deprecated.Create an EmbeddedJMSResource with the specified configuration file- Parameters:
filename- configuration file name
-
EmbeddedJMSResource
Deprecated.Create an EmbeddedJMSResource with the specified configuration file- Parameters:
serverConfigurationFileName- ActiveMQServer configuration file namejmsConfigurationFileName- JMSServerManager configuration file name
-
-
Method Details
-
addAcceptor
Deprecated.- Specified by:
addAcceptorin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>- Throws:
Exception
-
setMessageProperties
-
start
public void start()Deprecated.- Specified by:
startin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
stop
public void stop()Deprecated.- Specified by:
stopin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
before
-
after
protected void after()Deprecated.Stop the embedded ActiveMQ BrokerInvoked by JUnit to tear down the resource
- Overrides:
afterin classorg.junit.rules.ExternalResource
-
getJmsServer
Deprecated.- Specified by:
getJmsServerin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
getServerName
Deprecated.- Specified by:
getServerNamein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
getVmURL
Deprecated.- Specified by:
getVmURLin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
getDestinationQueue
Deprecated.- Specified by:
getDestinationQueuein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
getTopicQueues
Deprecated.- Specified by:
getTopicQueuesin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
getMessageCount
Deprecated.- Specified by:
getMessageCountin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createBytesMessage
public javax.jms.BytesMessage createBytesMessage()Deprecated.- Specified by:
createBytesMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createTextMessage
public javax.jms.TextMessage createTextMessage()Deprecated.- Specified by:
createTextMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMapMessage
public javax.jms.MapMessage createMapMessage()Deprecated.- Specified by:
createMapMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createObjectMessage
public javax.jms.ObjectMessage createObjectMessage()Deprecated.- Specified by:
createObjectMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createStreamMessage
public javax.jms.StreamMessage createStreamMessage()Deprecated.- Specified by:
createStreamMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMessage
public javax.jms.BytesMessage createMessage(byte[] body) Deprecated.- Specified by:
createMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMessage
Deprecated.- Specified by:
createMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMessage
Deprecated.- Specified by:
createMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMessage
Deprecated.- Specified by:
createMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMessage
Deprecated.- Specified by:
createMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMessage
Deprecated.- Specified by:
createMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMessage
Deprecated.- Specified by:
createMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
createMessage
Deprecated.- Specified by:
createMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessage
Deprecated.- Specified by:
pushMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessage
Deprecated.- Specified by:
pushMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessage
Deprecated.- Specified by:
pushMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessage
Deprecated.- Specified by:
pushMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessage
Deprecated.- Specified by:
pushMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessageWithProperties
public javax.jms.BytesMessage pushMessageWithProperties(String destinationName, byte[] body, Map<String, Object> properties) Deprecated.- Specified by:
pushMessageWithPropertiesin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessageWithProperties
public javax.jms.TextMessage pushMessageWithProperties(String destinationName, String body, Map<String, Object> properties) Deprecated.- Specified by:
pushMessageWithPropertiesin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessageWithProperties
public javax.jms.MapMessage pushMessageWithProperties(String destinationName, Map<String, Object> body, Map<String, Object> properties) Deprecated.- Specified by:
pushMessageWithPropertiesin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
pushMessageWithProperties
public javax.jms.ObjectMessage pushMessageWithProperties(String destinationName, Serializable body, Map<String, Object> properties) Deprecated.- Specified by:
pushMessageWithPropertiesin interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
peekMessage
Deprecated.- Specified by:
peekMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
peekBytesMessage
Deprecated.- Specified by:
peekBytesMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
peekTextMessage
Deprecated.- Specified by:
peekTextMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
peekMapMessage
Deprecated.- Specified by:
peekMapMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
peekObjectMessage
Deprecated.- Specified by:
peekObjectMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-
peekStreamMessage
Deprecated.- Specified by:
peekStreamMessagein interfaceEmbeddedJMSOperations<EmbeddedJMSResource>
-