All Implemented Interfaces:
Serializable

public class JGroupsRemoteConnection extends BroadcastRemoteConnection

Purpose: Define the implementation of the abstract RemoteConnection for JGroups.

Description: Executing commands implementation of RemoteConnection is done via JGroups JChannel.

Since:
EclipseLink 2.5
See Also:
  • Field Details

    • channel

      protected transient org.jgroups.JChannel channel
    • isLocal

      protected boolean isLocal
  • Constructor Details

    • JGroupsRemoteConnection

      public JGroupsRemoteConnection(RemoteCommandManager rcm, org.jgroups.JChannel channel, boolean isLocalConnectionBeingCreated)
      INTERNAL: Constructor creating either a local or external connection.
    • JGroupsRemoteConnection

      public JGroupsRemoteConnection(RemoteCommandManager rcm)
      Creates local connections.
  • Method Details

    • isLocal

      public boolean isLocal()
      INTERNAL: Indicates whether connection is local (subscriber) or external (publisher).
    • executeCommandInternal

      protected Object executeCommandInternal(Object command) throws Exception
      INTERNAL: Execute the remote command. The result of execution is returned. This method is used only by external (publishing) connection.
      Specified by:
      executeCommandInternal in class BroadcastRemoteConnection
      Throws:
      Exception
    • onMessage

      public void onMessage(org.jgroups.Message message)
      INTERNAL: Process received JGroups message. This method is used only by local (listening) connection.
    • areAllResourcesFreedOnClose

      protected boolean areAllResourcesFreedOnClose()
      INTERNAL: Indicates whether all the resources used by connection are freed after close method returns.
      Overrides:
      areAllResourcesFreedOnClose in class BroadcastRemoteConnection
    • closeInternal

      protected void closeInternal()
      INTERNAL: This method is called by close method.
      Specified by:
      closeInternal in class BroadcastRemoteConnection
    • logDebugMessage

      protected String logDebugMessage(org.jgroups.Message message)
      INTERNAL:
    • createDisplayString

      protected void createDisplayString()
      INTERNAL: Used for debug logging
      Overrides:
      createDisplayString in class BroadcastRemoteConnection
    • shouldCheckServiceId

      protected boolean shouldCheckServiceId()
      INTERNAL: Return whether a BroadcastConnection should check a ServiceId against its own ServiceId to avoid the processing of Commands with the same ServiceId. Not required for JGroups.
      Overrides:
      shouldCheckServiceId in class BroadcastRemoteConnection
      Returns:
      boolean