com.tibbo.aggregate.common.protocol

## Class RemoteServerController

- java.lang.Object
- - com.tibbo.aggregate.common.communication.AbstractDeviceController<IncomingAggreGateCommand,OutgoingAggreGateCommand>
  - - com.tibbo.aggregate.common.protocol.AbstractAggreGateDeviceController<RemoteServer,RemoteContextManager>
    - - com.tibbo.aggregate.common.protocol.RemoteServerController

- All Implemented Interfaces:
    CommandParserListener, AggreGateDeviceController<IncomingAggreGateCommand,OutgoingAggreGateCommand>, RemoteConnector

      public class RemoteServerController
      extends AbstractAggreGateDeviceController<RemoteServer,RemoteContextManager>

- - ### Field Summary

    - ### Fields inherited from class com.tibbo.aggregate.common.protocol.AbstractAggreGateDeviceController

      `commandWriter, FLAG_NO_REPLY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteServerController(RemoteServer device, boolean async)`
    `RemoteServerController(RemoteServer device, boolean async, boolean json)`
    `RemoteServerController(RemoteServer device, boolean async, boolean useContextManager, org.apache.log4j.Logger logger, int maxEventQueueLength)`
    `RemoteServerController(RemoteServer device, boolean async, boolean useContextManager, org.apache.log4j.Logger logger, int maxEventQueueLength, boolean json)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `connectImpl()`
    `java.util.TimerTask` | `createConnectionTimer()`
    `protected void` | `disconnectImpl()`
    `java.lang.String` | `getAddress()`
    `protected java.lang.String` | `getConnectionErrorMessage()`
    `protected BlockingChannel` | `getDataChannel()`
    `boolean` | `isConnected()`
    `protected boolean` | `loginImpl()`
    `protected void` | `prepareDataChannel()`
    `void` | `removeConnectionTimerTask()`
    `protected void` | `send(OutgoingAggreGateCommand cmd)`
    `protected void` | `setDataChannel(BlockingChannel socketChannel)`
    `void` | `start()`
    `void` | `startConnectionTimerTask(java.lang.String name)`
    `void` | `startConnectionTimerTask(java.lang.String name, long delay, long period)`

    - ### Methods inherited from class com.tibbo.aggregate.common.protocol.AbstractAggreGateDeviceController

      `addDisconnectListener, callRemoteFunction, callRemoteFunction, confirmEvent, createClassicEncodingSettings, decodeRemoteDataTable, destroy, getCallerController, getCommandBuilder, getContextManager, getDevice, getEventPreprocessor, getEventQueueLength, getFormatCache, getProtocolVersion, getProxyContexts, getRejectedEvents, getSettings, isAvoidSendingFormats, isPropagateUnifiedSearchRequests, isUsesCompression, processAsyncCommand, sendCommandAndCheckReplyCode, setAvoidSendingFormats, setCallerController, setCommandParser, setContextManager, setDevice, setFormatCache, setUsesCompression, toString`

    - ### Methods inherited from class com.tibbo.aggregate.common.communication.AbstractDeviceController

      `checkAndConnect, connect, disconnect, getActiveCommands, getCommandParser, getCommandTimeout, getLogger, getStatistics, isActive, isLoggedIn, login, newDataReceived, resetCommandTimeouts, sendCommand, setCommandTimeout, setConnected, setLoggedIn, setResetTimeoutsOnData, startCommandProcessor`

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

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

    - ### Methods inherited from interface com.tibbo.aggregate.common.protocol.AggreGateDeviceController

      `connect, disconnect, getActiveCommands, getStatistics, isActive, login, sendCommand`

- - ### Constructor Detail

    - #### RemoteServerController

          public RemoteServerController(RemoteServer device,
                                        boolean async)

    - #### RemoteServerController

          public RemoteServerController(RemoteServer device,
                                        boolean async,
                                        boolean json)

    - #### RemoteServerController

          public RemoteServerController(RemoteServer device,
                                        boolean async,
                                        boolean useContextManager,
                                        org.apache.log4j.Logger logger,
                                        int maxEventQueueLength)

    - #### RemoteServerController

          public RemoteServerController(RemoteServer device,
                                        boolean async,
                                        boolean useContextManager,
                                        org.apache.log4j.Logger logger,
                                        int maxEventQueueLength,
                                        boolean json)

  - ### Method Detail

    - #### connectImpl

          protected boolean connectImpl()
                                 throws java.lang.InterruptedException,
                                        DisconnectionException,
                                        java.io.IOException,
                                        RemoteDeviceErrorException,
                                        ContextException

      Overrides:
        `connectImpl` in class `AbstractAggreGateDeviceController<RemoteServer,RemoteContextManager>`
      Throws:
        `java.lang.InterruptedException`
        `DisconnectionException`
        `java.io.IOException`
        `RemoteDeviceErrorException`
        `ContextException`

    - #### prepareDataChannel

          protected void prepareDataChannel()
                                     throws RemoteDeviceErrorException

      Throws:
        `RemoteDeviceErrorException`

    - #### getConnectionErrorMessage

          protected java.lang.String getConnectionErrorMessage()

    - #### loginImpl

          protected boolean loginImpl()
                               throws ContextException

      Specified by:
        `loginImpl` in class `AbstractDeviceController<IncomingAggreGateCommand,OutgoingAggreGateCommand>`
      Throws:
        `ContextException`

    - #### start

          public void start()
                     throws java.io.IOException,
                            java.lang.InterruptedException,
                            ContextException,
                            RemoteDeviceErrorException

      Specified by:
        `start` in interface `AggreGateDeviceController<IncomingAggreGateCommand,OutgoingAggreGateCommand>`
      Specified by:
        `start` in class `AbstractAggreGateDeviceController<RemoteServer,RemoteContextManager>`
      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`
        `ContextException`
        `RemoteDeviceErrorException`

    - #### disconnectImpl

          protected void disconnectImpl()

      Overrides:
        `disconnectImpl` in class `AbstractAggreGateDeviceController<RemoteServer,RemoteContextManager>`

    - #### send

          protected void send(OutgoingAggreGateCommand cmd)
                       throws DisconnectionException,
                              java.io.IOException

      Specified by:
        `send` in class `AbstractDeviceController<IncomingAggreGateCommand,OutgoingAggreGateCommand>`
      Throws:
        `DisconnectionException`
        `java.io.IOException`

    - #### setDataChannel

          protected void setDataChannel(BlockingChannel socketChannel)

    - #### getDataChannel

          protected BlockingChannel getDataChannel()

    - #### isConnected

          public boolean isConnected()

      Overrides:
        `isConnected` in class `AbstractDeviceController<IncomingAggreGateCommand,OutgoingAggreGateCommand>`

    - #### getAddress

          public java.lang.String getAddress()

    - #### startConnectionTimerTask

          public void startConnectionTimerTask(java.lang.String name)

    - #### startConnectionTimerTask

          public void startConnectionTimerTask(java.lang.String name,
                                               long delay,
                                               long period)

    - #### removeConnectionTimerTask

          public void removeConnectionTimerTask()

    - #### createConnectionTimer

          public java.util.TimerTask createConnectionTimer()