Interface Connection

All Superinterfaces:
Endpoint, Extendable, ReactorChild
All Known Subinterfaces:
ProtonJConnection
All Known Implementing Classes:
ConnectionImpl

public interface Connection extends Endpoint, ReactorChild
Maintains lists of sessions, links and deliveries in a state that is interesting to the application. These are exposed by returning the head of those lists via sessionHead(EnumSet, EnumSet), linkHead(EnumSet, EnumSet) getWorkHead() respectively.
  • Method Details

    • session

      Session session()
      Returns a newly created session TODO does the Connection's channel-max property limit how many sessions can be created, or opened, or neither?
    • sessionHead

      Session sessionHead(EnumSet<EndpointState> local, EnumSet<EndpointState> remote)
      Returns the head of the list of sessions in the specified states. Typically used to discover sessions whose remote state has acquired particular values, e.g. sessions that have been remotely opened or closed. TODO what ordering guarantees on the returned "linked list" are provided?
      See Also:
    • linkHead

      Link linkHead(EnumSet<EndpointState> local, EnumSet<EndpointState> remote)
      Returns the head of the list of links in the specified states. Typically used to discover links whose remote state has acquired particular values, e.g. links that have been remotely opened or closed.
      See Also:
    • getWorkHead

      Delivery getWorkHead()
      Returns the head of the delivery work list. The delivery work list consists of unsettled deliveries whose state has been changed by the other container and not yet locally processed.
      See Also:
    • setContainer

      void setContainer(String container)
    • getContainer

      String getContainer()
    • setHostname

      void setHostname(String hostname)
      Set the name of the host (either fully qualified or relative) to which this connection is connecting to. This information may be used by the remote peer to determine the correct back-end service to connect the client to. This value will be sent in the Open performative. Note that it is illegal to set the hostname to a numeric IP address or include a port number.
      Parameters:
      hostname - the RFC1035 compliant host name.
    • getHostname

      String getHostname()
    • getRemoteContainer

      String getRemoteContainer()
    • getRemoteHostname

      String getRemoteHostname()
    • setOfferedCapabilities

      void setOfferedCapabilities(Symbol[] capabilities)
    • setDesiredCapabilities

      void setDesiredCapabilities(Symbol[] capabilities)
    • getRemoteOfferedCapabilities

      Symbol[] getRemoteOfferedCapabilities()
    • getRemoteDesiredCapabilities

      Symbol[] getRemoteDesiredCapabilities()
    • getRemoteProperties

      Map<Symbol,Object> getRemoteProperties()
    • setProperties

      void setProperties(Map<Symbol,Object> properties)
    • getContext

      Object getContext()
      Specified by:
      getContext in interface Endpoint
      See Also:
    • setContext

      void setContext(Object context)
      Description copied from interface: Endpoint
      Sets an arbitrary an application owned object on the end-point. This object is not used by Proton.
      Specified by:
      setContext in interface Endpoint
    • collect

      void collect(Collector collector)
    • getTransport

      Transport getTransport()
    • getReactor

      Reactor getReactor()