Class AmqpConnectionBuilder

    • Method Detail

      • buildResource

        public void buildResource​(AsyncResult request)
        Description copied from class: AmqpResourceBuilder
        Called to initiate the process of building the resource type that is managed by this builder. The resource is created and the open process occurs asynchronously. If the resource is successfully opened it will added to its parent resource for use.
        Overrides:
        buildResource in class AmqpResourceBuilder<AmqpConnection,​AmqpProvider,​JmsConnectionInfo,​org.apache.qpid.proton.engine.Connection>
        Parameters:
        request - The request that initiated the resource creation.
      • createResource

        protected AmqpConnection createResource​(AmqpProvider parent,
                                                JmsConnectionInfo resourceInfo,
                                                org.apache.qpid.proton.engine.Connection endpoint)
        Description copied from class: AmqpResourceBuilder
        Create the managed resource instance.
        Specified by:
        createResource in class AmqpResourceBuilder<AmqpConnection,​AmqpProvider,​JmsConnectionInfo,​org.apache.qpid.proton.engine.Connection>
        Parameters:
        parent - The parent of the newly created resource.
        resourceInfo - The resource information used to configure the resource.
        endpoint - The local endpoint for the managed resource to wrap.
        Returns:
        the resource instance who open life-cycle is managed by this builder.
      • afterOpened

        protected void afterOpened()
        Description copied from class: AmqpResourceBuilder
        Called once an endpoint has been opened and validated to give the subclasses a place to perform any follow-on processing or setup steps before the operation is deemed to have been completed and success is signaled.
        Overrides:
        afterOpened in class AmqpResourceBuilder<AmqpConnection,​AmqpProvider,​JmsConnectionInfo,​org.apache.qpid.proton.engine.Connection>
      • isClosePending

        protected boolean isClosePending()
        Description copied from class: AmqpResourceBuilder
        If the resource was opened but its current state indicates a close is pending then we do no need to proceed further into the resource creation process. Each endpoint build must implement this and examine the opened endpoint to determine if a close frame will follow the open.
        Specified by:
        isClosePending in class AmqpResourceBuilder<AmqpConnection,​AmqpProvider,​JmsConnectionInfo,​org.apache.qpid.proton.engine.Connection>
        Returns:
        true if the resource state indicates it will be immediately closed.
      • getRequestTimeout

        protected long getRequestTimeout()
        Description copied from class: AmqpResourceBuilder
        Returns the configured time before the open of the resource is considered to have failed. Subclasses can override this method to provide a value more appropriate to the resource being built.
        Overrides:
        getRequestTimeout in class AmqpResourceBuilder<AmqpConnection,​AmqpProvider,​JmsConnectionInfo,​org.apache.qpid.proton.engine.Connection>
        Returns:
        the configured timeout before the open of the resource fails.