com.streambase.liveview.server.table.plugin

## Class TestTableProvider

- java.lang.Object
- - com.streambase.liveview.server.table.plugin.TestTableProvider

- All Implemented Interfaces:
    TableProvider

      public class TestTableProvider
      extends Object
      implements TableProvider

  This is just for testing the addition and removal of Tables. If you actually query the Table is creates, you'll get an error.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TestTableProvider.UnsupportedTable`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static EnumSet<LiveViewTableCapability>` | `CAPABILITIES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestTableProvider()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CatalogedTable` | `createDummyCatalogedTable(String tableId)`
    `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.

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

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

- - ### Field Detail

    - #### CAPABILITIES

          public static final EnumSet<LiveViewTableCapability> CAPABILITIES

  - ### Constructor Detail

    - #### TestTableProvider

          public TestTableProvider()

  - ### Method Detail

    - #### initialize

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

      Description copied from interface: `TableProvider`
      An instance of your class will be initialized with the parameters that were defined in the LVConf.
      Specified by:
        `initialize` in interface `TableProvider`
      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

          public void start()
                     throws LiveViewException,
                            InterruptedException

      Description copied from interface: `TableProvider`
      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.
      Specified by:
        `start` in interface `TableProvider`
      Throws:
        `LiveViewException`
        `InterruptedException`

    - #### createDummyCatalogedTable

          public static CatalogedTable createDummyCatalogedTable(String tableId)

    - #### shutdown

          public void shutdown()

      Description copied from interface: `TableProvider`
      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.
      Specified by:
        `shutdown` in interface `TableProvider`

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