Interface QueryProcessorConnection

All Known Implementing Classes:
QueryProcessorConnectionImpl

public interface QueryProcessorConnection
A connection to a RemoteQueryProcessor.
  • Method Details

    • getDispatcherConnection

      QueryDispatcherConnection getDispatcherConnection()
    • getProcessorName

      String getProcessorName()
    • getProcessorHost

      String getProcessorHost()
    • getProcessorPort

      int getProcessorPort()
    • getWebsocketPort

      int getWebsocketPort()
    • getEnvoyPrefix

      String getEnvoyPrefix()
    • getWorkerName

      String getWorkerName()
    • getProcessInfoId

      String getProcessInfoId()
    • subscribeToPreemptiveUpdates

      boolean subscribeToPreemptiveUpdates(int tableId, BitSet columnsToSubscribe, boolean isViewPort)
    • unsubscribeFromPreemptiveUpdates

      boolean unsubscribeFromPreemptiveUpdates(int subscriptionId)
    • updatePreemptiveSubscriptionColumnsAsync

      Future<Boolean> updatePreemptiveSubscriptionColumnsAsync(int id, BitSet newColumns)
    • updateViewportAsync

      Future<Boolean> updateViewportAsync(int subscriptionId, Index newViewPort)
    • updateViewportAndColumnsAsync

      Future<Boolean> updateViewportAndColumnsAsync(int subscriptionId, Index newViewPort, BitSet newColumns)
    • getTableMapManager

      RemoteTableMapManager getTableMapManager()
    • subscribeToLogBuffer

      void subscribeToLogBuffer(@NotNull com.fishlib.io.logger.LogBufferRecordListener listener) throws IOException
      Throws:
      IOException
    • unsubscribeFromLogBuffer

      void unsubscribeFromLogBuffer(@NotNull com.fishlib.io.logger.LogBufferRecordListener listener) throws IOException
      Throws:
      IOException
    • isConnected

      boolean isConnected()
    • release

      void release() throws IOException
      Throws:
      IOException
    • getTableManager

      RemoteTableHandleManager getTableManager()
    • getRemoteDatabase

      RemoteDatabase getRemoteDatabase()
    • registerTableErrorHandler

      void registerTableErrorHandler(QueryProcessorConnection.AsynchronousErrorHandler asynchronousErrorHandler)
    • executeQuery

      <TYPE> TYPE executeQuery(RemoteQuery<TYPE> remoteQuery, boolean concurrent) throws IOException
      Execute the given query synchronously and return the result. This may convert the RemoteQuery into a byte stream and call executeQuery(byte[], boolean)
      Type Parameters:
      TYPE - the return type of the remote query
      Parameters:
      remoteQuery - the query
      concurrent - if true, permit the query to proceed concurrently with data refresh processing
      Returns:
      query result
      Throws:
      IOException - if an error occurs communicating with the server
    • executeQuery

      <TYPE> TYPE executeQuery(byte[] remoteQueryInstanceBytes, boolean concurrent)
      Execute the given query bytes synchronously and return the result. This method is for "advanced" usage only, if you already have a remote query instance in byte array form.
      Type Parameters:
      TYPE - the return type of the remote query
      Parameters:
      remoteQueryInstanceBytes - the query
      concurrent - if true, permit the query to proceed concurrently with data refresh processing
      Returns:
      query result
    • executeQuery

      default <TYPE> TYPE executeQuery(RemoteQuery<TYPE> remoteQuery) throws IOException
      Add concurrent=false and delegate to executeQuery(RemoteQuery, boolean)
      Type Parameters:
      TYPE - the return type of the remote query
      Parameters:
      remoteQuery - the query
      Returns:
      query result
      Throws:
      IOException - if an error occurs communicating with the server
    • executeQuery

      default <TYPE> TYPE executeQuery(byte[] remoteQueryInstanceBytes)
      Add concurrent=false and delegate to executeQuery(byte[], boolean)
      Type Parameters:
      TYPE - the return type of the remote query
      Parameters:
      remoteQueryInstanceBytes - the query
      Returns:
      query result
    • executeQueryAsync

      <TYPE> QueryProcessorConnection.QueryHandle executeQueryAsync(RemoteQuery<TYPE> remoteQuery, boolean concurrent, QueryProcessorConnection.AsyncQueryResultHandler<TYPE> handler) throws IOException
      Submit a query asynchronously. This may convert the RemoteQuery into a byte stream and call executeQueryAsync(byte[], boolean, AsyncQueryResultHandler) Query progress will be reported via the AsyncQueryResultHandler.
      Type Parameters:
      TYPE - the return type of the remote query
      Parameters:
      remoteQuery - the query
      concurrent - if true, permit the query to proceed concurrently with data refresh processing
      handler - asynchronous result handler
      Returns:
      a QueryHandle for the async query
      Throws:
      IOException - if an error occurs communicating with the server
    • executeQueryAsync

      <TYPE> QueryProcessorConnection.QueryFuture<TYPE> executeQueryAsync(RemoteQuery<TYPE> remoteQuery, boolean concurrent) throws IOException
      Submit a query asynchronously. This may convert the RemoteQuery into a byte stream and call executeQueryAsync(byte[], boolean) Returns a query handle from which the results can be retrieved when results are ready
      Type Parameters:
      TYPE - the return type of the remote query
      Parameters:
      remoteQuery - the query
      concurrent - if true, permit the query to proceed concurrently with data refresh processing
      Returns:
      a QueryFuture for the async query
      Throws:
      IOException - if an error occurs communicating with the server
    • executeQueryAsync

      <TYPE> QueryProcessorConnection.QueryHandle executeQueryAsync(byte[] remoteQueryInstanceBytes, boolean concurrent, QueryProcessorConnection.AsyncQueryResultHandler<TYPE> handler)
      Submit a query asynchronously. Query progress will be reported via the AsyncQueryResultHandler. This method is for "advanced" usage only, if you already have a remote query instance in byte array form.
      Type Parameters:
      TYPE - the return type of the remote query
      Parameters:
      remoteQueryInstanceBytes - the query
      concurrent - if true, permit the query to proceed concurrently with data refresh processing
      handler - asynchronous result handler
      Returns:
      a QueryHandle for the async query
    • executeQueryAsync

      <TYPE> QueryProcessorConnection.QueryFuture<TYPE> executeQueryAsync(byte[] remoteQueryInstanceBytes, boolean concurrent)
      Submit a query asynchronously. Returns a query handle from which the results can be retrieved when results are ready This method is for "advanced" usage only, if you already have a remote query instance in byte array form.
      Type Parameters:
      TYPE - the return type of the remote query
      Parameters:
      remoteQueryInstanceBytes - the query
      concurrent - if true, permit the query to proceed concurrently with data refresh processing
      Returns:
      a QueryFuture for the async query
    • releaseRemoteTableHandle

      void releaseRemoteTableHandle(Integer handleId)
    • invokeRemoteTableMethod

      Object[] invokeRemoteTableMethod(int tableId, Method method, Object[] args)
    • invokeRemoteTableMethodConcurrent

      Object invokeRemoteTableMethodConcurrent(int handleId, @NotNull Method method, Object[] args)
    • releaseRemoteTableMapHandle

      void releaseRemoteTableMapHandle(Integer handleId)
    • addCommandHandler

      Adds a command handler to the list of handlers that may service unknown commands. The QueryProcessorConnection does not hold a reference to the command handler; so the user must ensure reachability of the commandHandler.
      Parameters:
      commandHandler - the command handler to add.
    • removeCommandHandler

      void removeCommandHandler(QueryProcessorConnection.QueryProcessorConnectionCommandHandler commandHandler)
      Removes a command handler from the lsit of handlers that may service unknown commands.
      Parameters:
      commandHandler - the command handler to remove
    • sendCommandNoResponse

      void sendCommandNoResponse(com.fishlib.base.Command command) throws IOException
      Send a single commmand, expecting no response.
      Parameters:
      command - The command to send.
      Throws:
      IOException - If a problem occurs sending the command.