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

## Class JGroupsTransport

- java.lang.Object
- - org.jboss.jca.core.workmanager.transport.remote.AbstractRemoteTransport<org.jgroups.Address>
  - - org.jboss.jca.core.workmanager.transport.remote.jgroups.JGroupsTransport

- All Implemented Interfaces:
    org.jboss.jca.core.spi.workmanager.transport.Transport, org.jgroups.MembershipListener

      public class JGroupsTransport
      extends AbstractRemoteTransport<org.jgroups.Address>
      implements org.jgroups.MembershipListener

  The socket transport
  Author:
    Stefano Maestri, Jesper Pedersen

- - ### Field Summary

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

      `executorService, nodes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JGroupsTransport()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addWorkManager(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap, org.jgroups.Address address)` Delegator
    `void` | `block()`
    `void` | `clearDistributedStatistics(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `protected org.jgroups.blocks.RpcDispatcher` | `createRpcDispatcher()` Creates an rpc dispatcher used by this transport
    `void` | `deltaDoWorkAccepted(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `void` | `deltaDoWorkRejected(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `void` | `deltaScheduleWorkAccepted(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `void` | `deltaScheduleWorkRejected(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `void` | `deltaStartWorkAccepted(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `void` | `deltaStartWorkRejected(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `void` | `deltaWorkFailed(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `void` | `deltaWorkSuccessful(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `void` | `executeDoWork(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> classBundle, byte[] b)` Execute doWork
    `void` | `executeScheduleWork(java.util.Map<java.lang.String,java.lang.String> logicalAddress, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> classBundle, byte[] b)` Execute scheduleWork
    `long` | `executeStartWork(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> classBundle, byte[] b)` Execute startWork
    `org.jgroups.Channel` | `getChannel()` Get the channel.
    `java.lang.String` | `getClusterName()` Get the clustername.
    `java.util.Map<java.lang.String,java.lang.Integer>` | `getDistributedStatistics(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `long` | `getLongRunningFree(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `org.jgroups.Address` | `getOwnAddress()` Get the physical address
    `long` | `getShortRunningFree(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator
    `long` | `getTimeout()` Get the timeout
    `java.util.Set<java.util.Map<java.lang.String,java.lang.String>>` | `getWorkManagers()` Get WorkManagers
    `void` | `initialize()` Initialize the transport
    `boolean` | `isInitialized()` Is the transport initialized
    `void` | `join(java.util.Map<java.lang.String,java.lang.String> logicalAddress, org.jgroups.Address address)` Delegator
    `void` | `leave(org.jgroups.Address address)` Delegator
    `java.io.Serializable` | `sendMessage(org.jgroups.Address destAddress, ProtocolMessages.Request request, java.io.Serializable... parameters)` send a messagge using specific protocol.
    `void` | `setChannel(org.jgroups.Channel channel)` Set the channel.
    `void` | `setClusterName(java.lang.String clustername)` Set the clustername.
    `void` | `setTimeout(long v)` Set the timeout
    `void` | `shutdown()` Shutdown the transport
    `void` | `startup()` Startup the transport
    `void` | `suspect(org.jgroups.Address address)`
    `java.lang.String` | `toString()`
    `void` | `unblock()`
    `void` | `updateLongRunningFree(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap, java.lang.Long freeCount)` Delegator
    `void` | `updateShortRunningFree(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap, java.lang.Long freeCount)` Delegator
    `void` | `viewAccepted(org.jgroups.View view)`
    `void` | `workManagerRemove(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)` Delegator

    - ### 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, 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

    - #### JGroupsTransport

          public JGroupsTransport()

      Constructor

  - ### Method Detail

    - #### join

          public void join(java.util.Map<java.lang.String,java.lang.String> logicalAddress,
                           org.jgroups.Address address)

      Delegator
      Parameters:
        `logicalAddress` - The logical address
        `address` - The address

    - #### leave

          public void leave(org.jgroups.Address address)

      Delegator
      Overrides:
        `leave` in class `AbstractRemoteTransport<org.jgroups.Address>`
      Parameters:
        `address` - The address

    - #### getWorkManagers

          public java.util.Set<java.util.Map<java.lang.String,java.lang.String>> getWorkManagers()

      Get WorkManagers
      Returns:
        The value

    - #### addWorkManager

          public void addWorkManager(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap,
                                     org.jgroups.Address address)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address
        `address` - The address

    - #### workManagerRemove

          public void workManagerRemove(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### getShortRunningFree

          public long getShortRunningFree(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address
      Returns:
        the free count

    - #### getLongRunningFree

          public long getLongRunningFree(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address
      Returns:
        the free count

    - #### updateShortRunningFree

          public void updateShortRunningFree(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap,
                                             java.lang.Long freeCount)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address
        `freeCount` - freeCount

    - #### updateLongRunningFree

          public void updateLongRunningFree(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap,
                                            java.lang.Long freeCount)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address
        `freeCount` - freeCount

    - #### getDistributedStatistics

          public java.util.Map<java.lang.String,java.lang.Integer> getDistributedStatistics(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address
      Returns:
        The value

    - #### clearDistributedStatistics

          public void clearDistributedStatistics(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### deltaDoWorkAccepted

          public void deltaDoWorkAccepted(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### deltaDoWorkRejected

          public void deltaDoWorkRejected(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### deltaStartWorkAccepted

          public void deltaStartWorkAccepted(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### deltaStartWorkRejected

          public void deltaStartWorkRejected(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### deltaScheduleWorkAccepted

          public void deltaScheduleWorkAccepted(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### deltaScheduleWorkRejected

          public void deltaScheduleWorkRejected(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### deltaWorkSuccessful

          public void deltaWorkSuccessful(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### deltaWorkFailed

          public void deltaWorkFailed(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap)

      Delegator
      Parameters:
        `logicalAddressMap` - The logical address

    - #### executeDoWork

          public void executeDoWork(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap,
                                    java.util.List<java.util.Map<java.lang.String,java.lang.Object>> classBundle,
                                    byte[] b)
                             throws java.rmi.RemoteException

      Execute doWork
      Parameters:
        `logicalAddressMap` - The logical address
        `classBundle` - The class bundle
        `b` - The bytes
      Throws:
        `java.rmi.RemoteException` - in case of error

    - #### executeStartWork

          public long executeStartWork(java.util.Map<java.lang.String,java.lang.String> logicalAddressMap,
                                       java.util.List<java.util.Map<java.lang.String,java.lang.Object>> classBundle,
                                       byte[] b)
                                throws java.rmi.RemoteException

      Execute startWork
      Parameters:
        `logicalAddressMap` - The logical address
        `classBundle` - The class bundle
        `b` - The bytes
      Returns:
        the start value
      Throws:
        `java.rmi.RemoteException` - in case of error

    - #### executeScheduleWork

          public void executeScheduleWork(java.util.Map<java.lang.String,java.lang.String> logicalAddress,
                                          java.util.List<java.util.Map<java.lang.String,java.lang.Object>> classBundle,
                                          byte[] b)
                                   throws java.rmi.RemoteException

      Execute scheduleWork
      Parameters:
        `logicalAddress` - The logical address
        `classBundle` - The class bundle
        `b` - The bytes
      Throws:
        `java.rmi.RemoteException` - in case of error

    - #### 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

    - #### createRpcDispatcher

          protected org.jgroups.blocks.RpcDispatcher createRpcDispatcher()

      Creates an rpc dispatcher used by this transport
      Returns:
        an rpc dispatcher

    - #### 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

          public java.io.Serializable sendMessage(org.jgroups.Address destAddress,
                                                  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<org.jgroups.Address>`
      Parameters:
        `destAddress` - 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

    - #### getOwnAddress

          public org.jgroups.Address getOwnAddress()

      Get the physical address
      Specified by:
        `getOwnAddress` in class `AbstractRemoteTransport<org.jgroups.Address>`
      Returns:
        The value

    - #### getChannel

          public org.jgroups.Channel getChannel()

      Get the channel.
      Returns:
        the channel.

    - #### setChannel

          public void setChannel(org.jgroups.Channel channel)

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

    - #### getClusterName

          public java.lang.String getClusterName()

      Get the clustername.
      Returns:
        the clustername.

    - #### setClusterName

          public void setClusterName(java.lang.String clustername)

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

    - #### getTimeout

          public long getTimeout()

      Get the timeout
      Returns:
        The value

    - #### setTimeout

          public void setTimeout(long v)

      Set the timeout
      Parameters:
        `v` - The value

    - #### viewAccepted

          public void viewAccepted(org.jgroups.View view)

      Specified by:
        `viewAccepted` in interface `org.jgroups.MembershipListener`

    - #### block

          public void block()

      Specified by:
        `block` in interface `org.jgroups.MembershipListener`

    - #### suspect

          public void suspect(org.jgroups.Address address)

      Specified by:
        `suspect` in interface `org.jgroups.MembershipListener`

    - #### unblock

          public void unblock()

      Specified by:
        `unblock` in interface `org.jgroups.MembershipListener`

    - #### toString

          public java.lang.String toString()

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

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