Class ClientTransport

java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.client.transport.ClientTransport
All Implemented Interfaces:
org.cometd.bayeux.Transport
Direct Known Subclasses:
HttpClientTransport

public abstract class ClientTransport extends AbstractTransport
ClientTransports are used by BayeuxClient to send and receive Bayeux messages.
  • Field Details

  • Constructor Details

  • Method Details

    • getURL

      public String getURL()
    • setURL

      public void setURL(String url)
    • init

      public void init()
    • getJSONContextClient

      protected JSONContext.Client getJSONContextClient()
    • initScheduler

      protected void initScheduler()
    • shutdownScheduler

      protected void shutdownScheduler()
    • getScheduler

      protected ScheduledExecutorService getScheduler()
    • abort

      public abstract void abort(Throwable failure)
      Aborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as /meta/connects, without waiting for a response.
      Parameters:
      failure - the cause of the abort
      See Also:
    • terminate

      public void terminate()
      Terminates this transport, usually by closing network connections opened directly by this transport.
      See Also:
    • accept

      public abstract boolean accept(String version)
    • send

      public abstract void send(TransportListener listener, List<org.cometd.bayeux.Message.Mutable> messages)
    • parseMessages

      protected List<org.cometd.bayeux.Message.Mutable> parseMessages(String content) throws ParseException
      Throws:
      ParseException
    • generateJSON

      protected String generateJSON(List<org.cometd.bayeux.Message.Mutable> messages)
    • getMaxNetworkDelay

      public long getMaxNetworkDelay()
    • setMaxNetworkDelay

      protected void setMaxNetworkDelay(long maxNetworkDelay)