Class ProtonEndpoint<E extends Endpoint<E>>
java.lang.Object
org.apache.qpid.protonj2.engine.impl.ProtonEndpoint<E>
- Type Parameters:
- E- The specific- Endpointtype this abstract type implements.
- All Implemented Interfaces:
- Endpoint<E>
- Direct Known Subclasses:
- ProtonConnection,- ProtonLink,- ProtonSession,- ProtonTransactionController,- ProtonTransactionManager
Proton abstract 
Endpoint implementation that provides some common facilities.- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionProtonEndpoint(ProtonEngine engine) Create a newProtonEndpointinstance with the given Engine as the owner.
- 
Method SummaryModifier and TypeMethodDescriptioncloseHandler(EventHandler<E> remoteCloseEventHandler) Sets a EventHandler for when an AMQP Close frame is received from the remote peer.engineShutdownHandler(EventHandler<Engine> engineShutdownEventHandler) Sets anEventHandlerthat is invoked when the engine that supports thisEndpointis shutdown via a call toEngine.shutdown()which indicates a desire to terminate all engine operations.<T> T<T> TgetLinkedResource(Class<T> typeClass) Gets the linked resource (if set) and returns it using the type information provided to cast the returned value.If the remote has closed thisEndpointand provided anErrorConditionas part of the closing AMQP performative then this method will return it.localCloseHandler(EventHandler<E> localCloseEventHandler) Sets aEventHandlerfor when an thisEndpointis closed locally via a call toEndpoint.close()Typically used by clients for logging or other state update event processing.localOpenHandler(EventHandler<E> localOpenEventHandler) Sets aEventHandlerfor when an thisEndpointis opened locally via a call toEndpoint.open()Typically used by clients for logging or other state update event processing.openHandler(EventHandler<E> remoteOpenEventHandler) Sets a EventHandler for when an AMQP Open frame is received from the remote peer.setCondition(ErrorCondition condition) Sets the localErrorConditionto be applied to aEndpointclose.setLinkedResource(Object resource) Links a given resource to thisEndpoint.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.qpid.protonj2.engine.Endpointclose, getDesiredCapabilities, getOfferedCapabilities, getParent, getProperties, getRemoteDesiredCapabilities, getRemoteOfferedCapabilities, getRemoteProperties, isLocallyClosed, isLocallyOpen, isRemotelyClosed, isRemotelyOpen, open, setDesiredCapabilities, setOfferedCapabilities, setProperties
- 
Field Details- 
engine
 
- 
- 
Constructor Details- 
ProtonEndpointCreate a newProtonEndpointinstance with the given Engine as the owner.
 
- 
- 
Method Details- 
setLinkedResourceDescription copied from interface:EndpointLinks a given resource to thisEndpoint.
- 
getLinkedResourcepublic <T> T getLinkedResource()
- 
getLinkedResourceDescription copied from interface:EndpointGets the linked resource (if set) and returns it using the type information provided to cast the returned value.- Specified by:
- getLinkedResourcein interface- Endpoint<E extends Endpoint<E>>
- Type Parameters:
- T- The type to cast the linked resource to if one is set.
- Parameters:
- typeClass- the type's Class which is used for casting the returned value.
- Returns:
- the user set linked resource for this Context instance.
 
- 
getEngine
- 
getAttachments- Specified by:
- getAttachmentsin interface- Endpoint<E extends Endpoint<E>>
- Returns:
- the Attachmentsinstance that is associated with thisEndpoint
 
- 
getCondition
- 
setConditionDescription copied from interface:EndpointSets the localErrorConditionto be applied to aEndpointclose.
- 
getRemoteConditionDescription copied from interface:EndpointIf the remote has closed thisEndpointand provided anErrorConditionas part of the closing AMQP performative then this method will return it.- Specified by:
- getRemoteConditionin interface- Endpoint<E extends Endpoint<E>>
- Returns:
- the remote supplied ErrorCondition, or null if there is none.
 
- 
openHandlerDescription copied from interface:EndpointSets a EventHandler for when an AMQP Open frame is received from the remote peer. Used to process remotely initiated Connections. Locally initiated sessions have their own EventHandler invoked instead. This method is typically used by servers to listen for the remote peer to open itsEndpoint, while a client would listen for the server to open its end of theEndpointonce a local open has been performed. Typically used by clients as servers will typically listen to some parent resource event handler to determine if the remote is initiating a resource open.
- 
closeHandlerDescription copied from interface:EndpointSets a EventHandler for when an AMQP Close frame is received from the remote peer.
- 
localOpenHandlerDescription copied from interface:EndpointSets aEventHandlerfor when an thisEndpointis opened locally via a call toEndpoint.open()Typically used by clients for logging or other state update event processing. Clients should not perform any blocking calls within this context. It is an error for the handler to throw an exception and the outcome of doing so is undefined.- Specified by:
- localOpenHandlerin interface- Endpoint<E extends Endpoint<E>>
- Parameters:
- localOpenEventHandler- The- EventHandlerto notify when this- Endpointis locally opened.
- Returns:
- this Endpointinstance.
 
- 
localCloseHandlerDescription copied from interface:EndpointSets aEventHandlerfor when an thisEndpointis closed locally via a call toEndpoint.close()Typically used by clients for logging or other state update event processing. Clients should not perform any blocking calls within this context. It is an error for the handler to throw an exception and the outcome of doing so is undefined.- Specified by:
- localCloseHandlerin interface- Endpoint<E extends Endpoint<E>>
- Parameters:
- localCloseEventHandler- The- EventHandlerto notify when this- Endpointis locally closed.
- Returns:
- this Endpointinstance.
 
- 
engineShutdownHandlerDescription copied from interface:EndpointSets anEventHandlerthat is invoked when the engine that supports thisEndpointis shutdown via a call toEngine.shutdown()which indicates a desire to terminate all engine operations. AnyEndpointthat has been both locally and remotely closed will not receive this event as it will no longer be tracked by the parent its parentEndpoint. A typical use of this event would be from a locally closedEndpointthat is awaiting response from the remote. If this event fires then there will never be a remote response to any pending operations and the client or server instance should react accordingly to clean up any related resources etc.
 
-