de.esprit.netsuite.netdata

## Class AbstractCrossPlatformObject<C extends ClientContext,S extends ServerContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.netsuite.netdata.AbstractCrossPlatformObject<C,S>

- All Implemented Interfaces:
    SimpleLogSupport, DeepCloneable, Dumpable, ClientObject<C>, CrossPlatformObject<C,S>, ServerObject<S>, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    AbstractAgent, AccessibleServerObject

      public class AbstractCrossPlatformObject<C extends ClientContext,S extends ServerContext>
      extends TransferableObject
      implements CrossPlatformObject<C,S>, SimpleLogSupport

  This is the base class for objects that can live in both client and server environments
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractCrossPlatformObject(C clientCtx)`
    `AbstractCrossPlatformObject(S serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkOnClient()`
    `protected void` | `checkOnServer()`
    `C` | `getClientContext()` Returns the the client runtime environment
    `LogChannel` | `getLogChannel()`
    `S` | `getServerContext()` Returns the server runtime environment
    `boolean` | `isLogDebug()`
    `boolean` | `isLogVerbose()`
    `boolean` | `isOnClient()` Tells whether this object is currently alive on the client.
    `boolean` | `isOnServer()` Tells whether this object is currently alive on the server.
    `void` | `logDebug(java.lang.String message)`
    `void` | `logDump(java.lang.String message)`
    `void` | `logError(java.lang.String message)`
    `void` | `logError(java.lang.String message, java.lang.Exception error)`
    `void` | `logFatal(java.lang.String message, java.lang.Exception error)`
    `void` | `logInfo(java.lang.String message)`
    `void` | `logVerbose(java.lang.String message)`
    `void` | `logWarning(java.lang.String message)`
    `void` | `setClientContext(C clientCtx)` Sets the client runtime environment
    `void` | `setLogChannel(LogChannel logCh)`
    `void` | `setServerContext(S serverCtx)` Sets the server runtime environment

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `clone, deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

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

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

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toDumpString, toString, toString`

    - ### Methods inherited from interface de.esprit.common.type.DeepCloneable

      `deepClone`

- - ### Constructor Detail

    - #### AbstractCrossPlatformObject

          public AbstractCrossPlatformObject(S serverCtx)

    - #### AbstractCrossPlatformObject

          public AbstractCrossPlatformObject(C clientCtx)

  - ### Method Detail

    - #### getServerContext

          public final S getServerContext()

      Description copied from interface: `ServerObject`
      Returns the server runtime environment
      Specified by:
        `getServerContext` in interface `ServerObject<S extends ServerContext>`

    - #### getClientContext

          public final C getClientContext()

      Description copied from interface: `ClientObject`
      Returns the the client runtime environment
      Specified by:
        `getClientContext` in interface `ClientObject<C extends ClientContext>`

    - #### checkOnServer

          protected final void checkOnServer()

    - #### checkOnClient

          protected final void checkOnClient()

    - #### setServerContext

          public void setServerContext(S serverCtx)

      Description copied from interface: `CrossPlatformObject`
      Sets the server runtime environment
      Specified by:
        `setServerContext` in interface `CrossPlatformObject<C extends ClientContext,S extends ServerContext>`
      See Also:
        `ServerObject.getServerContext()`

    - #### setClientContext

          public void setClientContext(C clientCtx)

      Description copied from interface: `CrossPlatformObject`
      Sets the client runtime environment
      Specified by:
        `setClientContext` in interface `CrossPlatformObject<C extends ClientContext,S extends ServerContext>`
      See Also:
        `ClientObject.getClientContext()`

    - #### isOnServer

          public final boolean isOnServer()

      Description copied from interface: `CrossPlatformObject`
      Tells whether this object is currently alive on the server.
      Specified by:
        `isOnServer` in interface `CrossPlatformObject<C extends ClientContext,S extends ServerContext>`
      See Also:
        `ServerObject.getServerContext()`

    - #### isOnClient

          public final boolean isOnClient()

      Description copied from interface: `CrossPlatformObject`
      Tells whether this object is currently alive on the client.
      Specified by:
        `isOnClient` in interface `CrossPlatformObject<C extends ClientContext,S extends ServerContext>`
      See Also:
        `ClientObject.getClientContext()`

    - #### logFatal

          public void logFatal(java.lang.String message,
                      java.lang.Exception error)

      Specified by:
        `logFatal` in interface `SimpleLogSupport`

    - #### logError

          public void logError(java.lang.String message,
                      java.lang.Exception error)

      Specified by:
        `logError` in interface `SimpleLogSupport`

    - #### logError

          public void logError(java.lang.String message)

      Specified by:
        `logError` in interface `SimpleLogSupport`

    - #### logWarning

          public void logWarning(java.lang.String message)

      Specified by:
        `logWarning` in interface `SimpleLogSupport`

    - #### logInfo

          public void logInfo(java.lang.String message)

      Specified by:
        `logInfo` in interface `SimpleLogSupport`

    - #### logVerbose

          public void logVerbose(java.lang.String message)

      Specified by:
        `logVerbose` in interface `SimpleLogSupport`

    - #### logDebug

          public void logDebug(java.lang.String message)

      Specified by:
        `logDebug` in interface `SimpleLogSupport`

    - #### logDump

          public void logDump(java.lang.String message)

      Specified by:
        `logDump` in interface `SimpleLogSupport`

    - #### isLogDebug

          public boolean isLogDebug()

      Specified by:
        `isLogDebug` in interface `SimpleLogSupport`

    - #### isLogVerbose

          public boolean isLogVerbose()

      Specified by:
        `isLogVerbose` in interface `SimpleLogSupport`

    - #### getLogChannel

          public LogChannel getLogChannel()

      Specified by:
        `getLogChannel` in interface `SimpleLogSupport`

    - #### setLogChannel

          public void setLogChannel(LogChannel logCh)

      Specified by:
        `setLogChannel` in interface `SimpleLogSupport`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.