R - The JmsResource type that describe this resource.E - The AMQP Endpoint that this resource encapsulates.public abstract class AmqpAbstractResource<R extends JmsResource,E extends org.apache.qpid.proton.engine.Endpoint> extends Object implements AmqpResource
| Modifier and Type | Field and Description |
|---|---|
protected AsyncResult |
closeRequest |
protected ScheduledFuture<?> |
closeTimeoutTask |
| Constructor and Description |
|---|
AmqpAbstractResource(R resourceInfo,
E endpoint)
Creates a new instance with the JmsResource provided, and sets the Endpoint to the given value.
|
AmqpAbstractResource(R resourceInfo,
E endpoint,
AmqpResourceParent parent)
Creates a new instance with the JmsResource provided, and sets the Endpoint to the given value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(AsyncResult request) |
protected void |
closeOrDetachEndpoint()
Perform the close operation on the managed endpoint.
|
void |
closeResource(AmqpProvider provider,
ProviderException cause,
boolean remotelyClosed) |
E |
getEndpoint() |
org.apache.qpid.proton.engine.EndpointState |
getLocalState() |
AmqpResourceParent |
getParent() |
org.apache.qpid.proton.engine.EndpointState |
getRemoteState() |
R |
getResourceInfo() |
void |
handleResourceClosure(AmqpProvider provider,
ProviderException error) |
boolean |
isAwaitingClose() |
boolean |
isClosed() |
boolean |
isOpen() |
void |
processDeliveryUpdates(AmqpProvider provider,
org.apache.qpid.proton.engine.Delivery delivery)
Called when the Proton Engine signals an Delivery related event has been triggered
for the given endpoint.
|
void |
processFlowUpdates(AmqpProvider provider)
Called when the Proton Engine signals an Flow related event has been triggered
for the given endpoint.
|
void |
processRemoteClose(AmqpProvider provider)
Event handler for remote peer close of this resource.
|
void |
processRemoteDetach(AmqpProvider provider)
Event handler for remote peer detach of this resource.
|
void |
processRemoteOpen(AmqpProvider provider)
Event handler for remote peer open of this resource.
|
protected AsyncResult closeRequest
protected ScheduledFuture<?> closeTimeoutTask
public AmqpAbstractResource(R resourceInfo, E endpoint)
resourceInfo - The JmsResource instance that this AmqpResource is managing.endpoint - The Proton Endpoint instance that this object maps to.public AmqpAbstractResource(R resourceInfo, E endpoint, AmqpResourceParent parent)
resourceInfo - The JmsResource instance that this AmqpResource is managing.endpoint - The Proton Endpoint instance that this object maps to.parent - The parent of this resource (null if no parent).public void close(AsyncResult request)
public void closeResource(AmqpProvider provider, ProviderException cause, boolean remotelyClosed)
public void handleResourceClosure(AmqpProvider provider, ProviderException error)
protected void closeOrDetachEndpoint()
public E getEndpoint()
public R getResourceInfo()
public AmqpResourceParent getParent()
public boolean isOpen()
public boolean isClosed()
public boolean isAwaitingClose()
public org.apache.qpid.proton.engine.EndpointState getLocalState()
public org.apache.qpid.proton.engine.EndpointState getRemoteState()
public final void processRemoteOpen(AmqpProvider provider) throws ProviderException
AmqpEventSinkprocessRemoteOpen in interface AmqpEventSinkprovider - the AmqpProvider instance for easier access to fire events.ProviderException - if an error occurs while processing the update.public void processRemoteDetach(AmqpProvider provider) throws ProviderException
AmqpEventSinkprocessRemoteDetach in interface AmqpEventSinkprovider - the AmqpProvider instance for easier access to fire events.ProviderException - if an error occurs while processing the update.public void processRemoteClose(AmqpProvider provider) throws ProviderException
AmqpEventSinkprocessRemoteClose in interface AmqpEventSinkprovider - the AmqpProvider instance for easier access to fire events.ProviderException - if an error occurs while processing the update.public void processDeliveryUpdates(AmqpProvider provider, org.apache.qpid.proton.engine.Delivery delivery) throws ProviderException
AmqpEventSinkprocessDeliveryUpdates in interface AmqpEventSinkprovider - the AmqpProvider instance for easier access to fire events.delivery - the Delivery that has an update to its state which needs handled.ProviderException - if an error occurs while processing the update.public void processFlowUpdates(AmqpProvider provider) throws ProviderException
AmqpEventSinkprocessFlowUpdates in interface AmqpEventSinkprovider - the AmqpProvider instance for easier access to fire events.ProviderException - if an error occurs while processing the update.Copyright © 2013–2019 The Apache Software Foundation. All rights reserved.