org.apache.cayenne.rop

## Class HttpClientConnection

- java.lang.Object
- - org.apache.cayenne.remote.BaseConnection
  - - org.apache.cayenne.rop.HttpClientConnection

- All Implemented Interfaces:
    ClientConnection

      public class HttpClientConnection
      extends BaseConnection

- - ### Field Summary

    - ### Fields inherited from class org.apache.cayenne.remote.BaseConnection

      `logger, messageId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpClientConnection(RemoteService remoteService, String sharedSession)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `beforeSendMessage(ClientMessage message)` Called before logging the beginning of message processing.
    `protected void` | `connect()`
    `protected EventBridge` | `createServerEventBridge(RemoteSession session)` Creates an EventBridge that will listen for server events.
    `protected Object` | `doSendMessage(ClientMessage message)` The worker method invoked to process message.
    `EventBridge` | `getServerEventBridge()` Returns an EventBridge that receives remote server events.
    `RemoteSession` | `getSession()`
    `void` | `shutdown()`

    - ### Methods inherited from class org.apache.cayenne.remote.BaseConnection

      `getProcessedMessagesCount, sendMessage`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HttpClientConnection

          public HttpClientConnection(RemoteService remoteService,
                                      String sharedSession)

  - ### Method Detail

    - #### getSession

          public RemoteSession getSession()

    - #### beforeSendMessage

          protected void beforeSendMessage(ClientMessage message)
                                    throws CayenneRuntimeException

      Description copied from class: `BaseConnection`
      Called before logging the beginning of message processing.
      Specified by:
        `beforeSendMessage` in class `BaseConnection`
      Throws:
        `CayenneRuntimeException`

    - #### doSendMessage

          protected Object doSendMessage(ClientMessage message)
                                  throws CayenneRuntimeException

      Description copied from class: `BaseConnection`
      The worker method invoked to process message.
      Specified by:
        `doSendMessage` in class `BaseConnection`
      Throws:
        `CayenneRuntimeException`

    - #### getServerEventBridge

          public EventBridge getServerEventBridge()
                                           throws CayenneRuntimeException

      Description copied from interface: `ClientConnection`
      Returns an EventBridge that receives remote server events. Caller would normally register returned bridge with a local EventManager, thus allowing local listeners to receive server events.
      Returns:
        An EventBridge or null if server events are not supported.
      Throws:
        `CayenneRuntimeException`

    - #### shutdown

          @BeforeScopeEnd
          public void shutdown()
                                         throws RemoteException

      Throws:
        `RemoteException`

    - #### connect

          protected void connect()

    - #### createServerEventBridge

          protected EventBridge createServerEventBridge(RemoteSession session)
                                                 throws CayenneRuntimeException

      Creates an EventBridge that will listen for server events. Returns null if server events support is not configured in the descriptor.
      Throws:
        `CayenneRuntimeException` - if EventBridge startup fails for any reason.

Copyright © 2001–2023 Apache Cayenne. All rights reserved.