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.
|
E |
getEndpoint() |
org.apache.qpid.proton.engine.EndpointState |
getLocalState() |
AmqpResourceParent |
getParent() |
org.apache.qpid.proton.engine.EndpointState |
getRemoteState() |
R |
getResourceInfo() |
boolean |
isAwaitingClose() |
boolean |
isClosed() |
boolean |
isOpen() |
void |
processDeliveryUpdates(AmqpProvider provider)
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.
|
void |
remotelyClosed(AmqpProvider provider) |
void |
resourceClosed() |
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 resourceClosed()
public void remotelyClosed(AmqpProvider provider)
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 IOException
AmqpEventSink
processRemoteOpen
in interface AmqpEventSink
provider
- the AmqpProvider instance for easier access to fire events.IOException
- if an error occurs while processing the update.public void processRemoteDetach(AmqpProvider provider) throws IOException
AmqpEventSink
processRemoteDetach
in interface AmqpEventSink
provider
- the AmqpProvider instance for easier access to fire events.IOException
- if an error occurs while processing the update.public void processRemoteClose(AmqpProvider provider) throws IOException
AmqpEventSink
processRemoteClose
in interface AmqpEventSink
provider
- the AmqpProvider instance for easier access to fire events.IOException
- if an error occurs while processing the update.public void processDeliveryUpdates(AmqpProvider provider) throws IOException
AmqpEventSink
processDeliveryUpdates
in interface AmqpEventSink
provider
- the AmqpProvider instance for easier access to fire events.IOException
- if an error occurs while processing the update.public void processFlowUpdates(AmqpProvider provider) throws IOException
AmqpEventSink
processFlowUpdates
in interface AmqpEventSink
provider
- the AmqpProvider instance for easier access to fire events.IOException
- if an error occurs while processing the update.Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.