public class PostMessage extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
PostMessage.Pooled |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
defaultDurable |
protected String |
destination |
protected ArrayBlockingQueue<PostMessage.Pooled> |
pool |
protected int |
poolSize |
protected long |
producerTimeToLive |
protected DestinationServiceManager |
serviceManager |
protected org.apache.activemq.artemis.api.core.client.ClientSessionFactory |
sessionFactory |
| Constructor and Description |
|---|
PostMessage() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPooled() |
void |
cleanup() |
protected org.apache.activemq.artemis.api.core.client.ClientMessage |
createActiveMQMessage(javax.ws.rs.core.HttpHeaders headers,
byte[] body,
boolean durable,
Long ttl,
Long expiration,
Integer priority,
org.apache.activemq.artemis.api.core.client.ClientSession session) |
protected String |
generateDupId() |
String |
getDestination() |
protected PostMessage.Pooled |
getPooled() |
int |
getPoolSize() |
long |
getProducerTimeToLive() |
DestinationServiceManager |
getServiceManager() |
org.apache.activemq.artemis.api.core.client.ClientSessionFactory |
getSessionFactory() |
void |
init() |
boolean |
isDefaultDurable() |
javax.ws.rs.core.Response |
postWithId(String dupId,
Boolean durable,
Long ttl,
Long expiration,
Integer priority,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo uriInfo,
byte[] body) |
void |
publish(javax.ws.rs.core.HttpHeaders headers,
byte[] body,
String dup,
boolean durable,
Long ttl,
Long expiration,
Integer priority) |
javax.ws.rs.core.Response |
putWithId(String dupId,
Boolean durable,
Long ttl,
Long expiration,
Integer priority,
javax.ws.rs.core.HttpHeaders headers,
javax.ws.rs.core.UriInfo uriInfo,
byte[] body) |
void |
setDefaultDurable(boolean defaultDurable) |
void |
setDestination(String destination) |
void |
setPoolSize(int poolSize) |
void |
setProducerTimeToLive(long producerTimeToLive) |
void |
setServiceManager(DestinationServiceManager serviceManager) |
void |
setSessionFactory(org.apache.activemq.artemis.api.core.client.ClientSessionFactory sessionFactory) |
protected org.apache.activemq.artemis.api.core.client.ClientSessionFactory sessionFactory
protected String destination
protected boolean defaultDurable
protected DestinationServiceManager serviceManager
protected long producerTimeToLive
protected ArrayBlockingQueue<PostMessage.Pooled> pool
protected int poolSize
protected String generateDupId()
public void publish(javax.ws.rs.core.HttpHeaders headers,
byte[] body,
String dup,
boolean durable,
Long ttl,
Long expiration,
Integer priority)
throws Exception
Exception@PUT
@Path(value="{id}")
public javax.ws.rs.core.Response putWithId(@PathParam(value="id")
String dupId,
@QueryParam(value="durable")
Boolean durable,
@QueryParam(value="ttl")
Long ttl,
@QueryParam(value="expiration")
Long expiration,
@QueryParam(value="priority")
Integer priority,
@Context
javax.ws.rs.core.HttpHeaders headers,
@Context
javax.ws.rs.core.UriInfo uriInfo,
byte[] body)
@POST
@Path(value="{id}")
public javax.ws.rs.core.Response postWithId(@PathParam(value="id")
String dupId,
@QueryParam(value="durable")
Boolean durable,
@QueryParam(value="ttl")
Long ttl,
@QueryParam(value="expiration")
Long expiration,
@QueryParam(value="priority")
Integer priority,
@Context
javax.ws.rs.core.HttpHeaders headers,
@Context
javax.ws.rs.core.UriInfo uriInfo,
byte[] body)
public long getProducerTimeToLive()
public void setProducerTimeToLive(long producerTimeToLive)
public DestinationServiceManager getServiceManager()
public void setServiceManager(DestinationServiceManager serviceManager)
public org.apache.activemq.artemis.api.core.client.ClientSessionFactory getSessionFactory()
public void setSessionFactory(org.apache.activemq.artemis.api.core.client.ClientSessionFactory sessionFactory)
public String getDestination()
public void setDestination(String destination)
public boolean isDefaultDurable()
public void setDefaultDurable(boolean defaultDurable)
public int getPoolSize()
public void setPoolSize(int poolSize)
protected void addPooled()
throws org.apache.activemq.artemis.api.core.ActiveMQException
org.apache.activemq.artemis.api.core.ActiveMQExceptionprotected PostMessage.Pooled getPooled() throws InterruptedException
InterruptedExceptionpublic void cleanup()
protected org.apache.activemq.artemis.api.core.client.ClientMessage createActiveMQMessage(javax.ws.rs.core.HttpHeaders headers,
byte[] body,
boolean durable,
Long ttl,
Long expiration,
Integer priority,
org.apache.activemq.artemis.api.core.client.ClientSession session)
throws Exception
ExceptionCopyright © 2023 The Apache Software Foundation. All Rights Reserved.