org.jboss.jca.core.workmanager.transport.remote.socket

## Class SocketTransport

- java.lang.Object
- - org.jboss.jca.core.workmanager.transport.remote.AbstractRemoteTransport<java.lang.String>
  - - org.jboss.jca.core.workmanager.transport.remote.socket.SocketTransport

- All Implemented Interfaces:
    java.lang.Runnable, org.jboss.jca.core.spi.workmanager.transport.Transport

      public class SocketTransport
      extends AbstractRemoteTransport<java.lang.String>
      implements java.lang.Runnable

  The socket transport
  Author:
    Jesper Pedersen

- - ### Field Summary

    - ### Fields inherited from class org.jboss.jca.core.workmanager.transport.remote.AbstractRemoteTransport

      `executorService, nodes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocketTransport()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getOwnAddress()` Get the physical address
    `void` | `initialize()` Initialize the transport
    `boolean` | `isInitialized()` Is the transport initialized
    `void` | `run()`
    `protected java.io.Serializable` | `sendMessage(java.lang.String address, ProtocolMessages.Request request, java.io.Serializable... parameters)` send a messagge using specific protocol.
    `void` | `setHost(java.lang.String host)` Set the host.
    `void` | `setPeers(java.util.Set<java.lang.String> peers)` Set the peers
    `void` | `setPort(int port)` Set the port.
    `void` | `shutdown()` Shutdown the transport
    `void` | `startup()` Startup the transport
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.jboss.jca.core.workmanager.transport.remote.AbstractRemoteTransport

      `clearDistributedStatistics, deltaDoWorkAccepted, deltaDoWorkRejected, deltaScheduleWorkAccepted, deltaScheduleWorkRejected, deltaStartWorkAccepted, deltaStartWorkRejected, deltaWorkFailed, deltaWorkSuccessful, doWork, getAddresses, getDistributedStatistics, getExecutorService, getId, getLongRunningFree, getShortRunningFree, join, leave, localClearDistributedStatistics, localDeltaDoWorkAccepted, localDeltaDoWorkRejected, localDeltaScheduleWorkAccepted, localDeltaScheduleWorkRejected, localDeltaStartWorkAccepted, localDeltaStartWorkRejected, localDeltaWorkFailed, localDeltaWorkSuccessful, localDoWork, localGetDistributedStatistics, localGetLongRunningFree, localGetShortRunningFree, localPing, localScheduleWork, localStartWork, localUpdateLongRunningFree, localUpdateShortRunningFree, localWorkManagerAdd, localWorkManagerRemove, ping, register, scheduleWork, setExecutorService, setId, startWork, unregister, updateLongRunningFree, updateShortRunningFree`

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

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

- - ### Constructor Detail

    - #### SocketTransport

          public SocketTransport()

      Constructor

  - ### Method Detail

    - #### startup

          public void startup()
                       throws java.lang.Throwable

      Startup the transport
      Specified by:
        `startup` in interface `org.jboss.jca.core.spi.workmanager.transport.Transport`
      Throws:
        `java.lang.Throwable` - In case of an error

    - #### isInitialized

          public boolean isInitialized()

      Is the transport initialized
      Specified by:
        `isInitialized` in interface `org.jboss.jca.core.spi.workmanager.transport.Transport`
      Returns:
        The value

    - #### initialize

          public void initialize()
                          throws java.lang.Throwable

      Initialize the transport
      Specified by:
        `initialize` in interface `org.jboss.jca.core.spi.workmanager.transport.Transport`
      Throws:
        `java.lang.Throwable` - In case of an error

    - #### shutdown

          public void shutdown()
                        throws java.lang.Throwable

      Shutdown the transport
      Specified by:
        `shutdown` in interface `org.jboss.jca.core.spi.workmanager.transport.Transport`
      Throws:
        `java.lang.Throwable` - In case of an error

    - #### sendMessage

          protected java.io.Serializable sendMessage(java.lang.String address,
                                                     ProtocolMessages.Request request,
                                                     java.io.Serializable... parameters)
                                              throws javax.resource.spi.work.WorkException

      Description copied from class: `AbstractRemoteTransport`
      send a messagge using specific protocol. Method overridden in specific protocol implementation classes
      Specified by:
        `sendMessage` in class `AbstractRemoteTransport<java.lang.String>`
      Parameters:
        `address` - the physical address
        `request` - the request
        `parameters` - the parameters
      Returns:
        the returned value. Can be null if requested operation return a void
      Throws:
        `javax.resource.spi.work.WorkException` - in case of problem with the work

    - #### setHost

          public void setHost(java.lang.String host)

      Set the host.
      Parameters:
        `host` - The host to set.

    - #### setPort

          public void setPort(int port)

      Set the port.
      Parameters:
        `port` - The port to set.

    - #### setPeers

          public void setPeers(java.util.Set<java.lang.String> peers)

      Set the peers
      Parameters:
        `peers` - The peers

    - #### getOwnAddress

          public java.lang.String getOwnAddress()

      Get the physical address
      Specified by:
        `getOwnAddress` in class `AbstractRemoteTransport<java.lang.String>`
      Returns:
        The value

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)