public class AmqpConnection extends AmqpAbstractResource<JmsConnectionInfo,org.apache.qpid.proton.engine.Connection> implements AmqpResourceParent
closeRequest, closeTimeoutTask| Constructor and Description |
|---|
AmqpConnection(AmqpProvider provider,
JmsConnectionInfo info,
org.apache.qpid.proton.engine.Connection protonConnection) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildResource(AmqpResource resource)
Adds the given resource as a child of this resource so that it's
lifetime becomes managed by that of its parent.
|
void |
createSession(JmsSessionInfo sessionInfo,
AsyncResult request) |
void |
createTemporaryDestination(JmsTemporaryDestination destination,
AsyncResult request) |
AmqpJmsMessageFactory |
getAmqpMessageFactory() |
int |
getAnonymousProducerCacheSize() |
int |
getAnonymousProducerCacheTimeout() |
AmqpConnectionSession |
getConnectionSession()
Retrieves the AmqpConnectionSession owned by this AmqpConnection.
|
AmqpConnectionProperties |
getProperties()
Returns the connection properties for an established connection which defines the various
capabilities and configuration options of the remote connection.
|
AmqpProvider |
getProvider() |
String |
getQueuePrefix() |
URI |
getRemoteURI() |
AmqpSession |
getSession(JmsSessionId sessionId)
Retrieve the indicated Session instance from the list of active sessions.
|
AmqpSubscriptionTracker |
getSubTracker() |
AmqpTemporaryDestination |
getTemporaryDestination(JmsTemporaryDestination destination) |
String |
getTopicPrefix() |
void |
handleResourceClosure(AmqpProvider provider,
ProviderException cause) |
boolean |
isObjectMessageUsesAmqpTypes() |
void |
processRemoteClose(AmqpProvider provider)
Event handler for remote peer close of this resource.
|
void |
removeChildResource(AmqpResource resource)
Removes the given resource from the registered child resources
managed by this one.
|
ScheduledFuture<?> |
schedule(Runnable task,
long delay)
Allows a connection resource to schedule a task for future execution.
|
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable task,
long delay)
Allows a connection resource to schedule a task for future execution which will start after the
given delay and then repeat with a fixed delay between the end of one execution of the task and
the beginning of the next execution.
|
void |
setObjectMessageUsesAmqpTypes(boolean objectMessageUsesAmqpTypes)
Configures the body type used in ObjectMessage instances that are sent from
this connection.
|
void |
setQueuePrefix(String queuePrefix) |
void |
setTopicPrefix(String topicPrefix) |
String |
toString() |
void |
unsubscribe(String subscriptionName,
AsyncResult request) |
close, closeOrDetachEndpoint, closeResource, getEndpoint, getLocalState, getParent, getRemoteState, getResourceInfo, isAwaitingClose, isClosed, isOpen, processDeliveryUpdates, processFlowUpdates, processRemoteDetach, processRemoteOpenpublic AmqpConnection(AmqpProvider provider, JmsConnectionInfo info, org.apache.qpid.proton.engine.Connection protonConnection)
public void createSession(JmsSessionInfo sessionInfo, AsyncResult request)
public void createTemporaryDestination(JmsTemporaryDestination destination, AsyncResult request)
public AmqpTemporaryDestination getTemporaryDestination(JmsTemporaryDestination destination)
public void unsubscribe(String subscriptionName, AsyncResult request)
public void addChildResource(AmqpResource resource)
AmqpResourceParentaddChildResource in interface AmqpResourceParentresource - The AmqpResource that is a child of this one.public void removeChildResource(AmqpResource resource)
AmqpResourceParentremoveChildResource in interface AmqpResourceParentresource - The AmqpResource that is no longer a child of this one.public void handleResourceClosure(AmqpProvider provider, ProviderException cause)
handleResourceClosure in class AmqpAbstractResource<JmsConnectionInfo,org.apache.qpid.proton.engine.Connection>public void processRemoteClose(AmqpProvider provider) throws ProviderException
AmqpEventSinkprocessRemoteClose in interface AmqpEventSinkprocessRemoteClose in class AmqpAbstractResource<JmsConnectionInfo,org.apache.qpid.proton.engine.Connection>provider - the AmqpProvider instance for easier access to fire events.ProviderException - if an error occurs while processing the update.public URI getRemoteURI()
public AmqpProvider getProvider()
getProvider in interface AmqpResourceParentpublic String getQueuePrefix()
public void setQueuePrefix(String queuePrefix)
public String getTopicPrefix()
public void setTopicPrefix(String topicPrefix)
public AmqpSession getSession(JmsSessionId sessionId)
sessionId - The JmsSessionId that's associated with the target session.public AmqpConnectionSession getConnectionSession()
public boolean isObjectMessageUsesAmqpTypes()
public void setObjectMessageUsesAmqpTypes(boolean objectMessageUsesAmqpTypes)
objectMessageUsesAmqpTypes - the objectMessageUsesAmqpTypes value to set.public int getAnonymousProducerCacheSize()
public int getAnonymousProducerCacheTimeout()
public AmqpJmsMessageFactory getAmqpMessageFactory()
public AmqpConnectionProperties getProperties()
public AmqpSubscriptionTracker getSubTracker()
public ScheduledFuture<?> schedule(Runnable task, long delay)
task - The Runnable task to be executed after the given delay.delay - The delay in milliseconds to schedule the given task for execution.public ScheduledFuture<?> scheduleWithFixedDelay(Runnable task, long delay)
task - The Runnable task to be executed after the given delay.delay - The delay in milliseconds to schedule the given task for execution.Copyright © 2013–2019 The Apache Software Foundation. All rights reserved.