void startPushSession()

This method is used to start a new PushAPI session. This allows you to handle a "session" when working with the Push API server.

It aims to solve the following use case:

  • the connector starts an indexing phase, and starts sending documents to the Push API server,

  • the Indexing Server crashes or is being killed (or the server suddenly reboots); documents previously received are lost,

  • the Indexing Server restarts,

  • the connector sends remaining documents to the Push API server, unaware that the remote Push API server died, and the synchronization is therefore in a “lost” state.

This is done by introducing a session identifier (an integer) that identifies the remote component pushing the documents - this identifier changes each time the Exalead CloudView session manager (re)starts.

This page discusses:

HTTP method

The get_current_session_id command allows you to get the remote Push API server session ID, which is generated when the Push API server starts. The method used is:

GET http://<host>:<port>/papi/4/connectors/<connectorName>/get_current_session_id

HTTP response

The get_current_session_id command returns the current Push API server session id (long integer ; at least 63-bit). This identifier is used internally by Push API client helpers.

API response

The API function does not return any value. It throws a PushAPISessionExistsException if a session is already opened.