com.streambase.liveview.server.table.plugin

## Interface TableProvider

- All Known Implementing Classes:
    TestTableProvider

      public interface TableProvider

  Implement this interface to add a custom TableProvider to LiveView. In an LVConf, reference your implementation as the example below, assuming your class that implements TableProvider is com.MyCompany.MyTableProvider.
  Since:
    LiveView 1.6

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initialize(String id, TableProviderControl helper, TableProviderParameters parameters, TableNameMapper mapper)` An instance of your class will be initialized with the parameters that were defined in the LVConf.
    `void` | `shutdown()` When this is called, you should close threads and do whatever else is necessary to clean up.
    `void` | `start()` You should connect to your server successfully before returning from this call.

- - ### Method Detail

    - #### initialize

          void initialize(String id,
                          TableProviderControl helper,
                          TableProviderParameters parameters,
                          TableNameMapper mapper)
                   throws LiveViewException

      An instance of your class will be initialized with the parameters that were defined in the LVConf.
      Parameters:
        `id` - The id by which this TableProvider is declared
        `helper` - Used to control the life cycle of the table
        `parameters` - Allows parameters supplied in LVCONFs to be passed to the table implementation
        `mapper` - Provides a means to translate tables names based on LVCONF configuration
      Throws:
        `LiveViewException`

    - #### start

          void start()
              throws LiveViewException,
                     InterruptedException

      You should connect to your server successfully before returning from this call. Once you return, the failedAttemptsCount associated with your TableProvider will be cleared, so don't return until you feel that some measure of success was achieved. Note that a new thread is created for the call to this method, so if you need to poll your server, you can simply not return from this method. However, if this is the case, then you should call the clearRetryCount() method of the TableProviderControl once you have successfullly connected. If you are unable to connect with your back end, or if you lose the connection in a polling situation, throw a LiveViewException out of this method. If you are polling the back end, you will get an interrupt from your Thread.sleep() if your TableProvider is being closed. You can just let it throw out of the method or you can catch it, clean up, and rethrow it.
      Throws:
        `LiveViewException`
        `InterruptedException`

    - #### shutdown

          void shutdown()

      When this is called, you should close threads and do whatever else is necessary to clean up. This means either that your provider was shut down via a service call, or else LiveView itself is shutting down.

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.