Class TcpDatagramSocketProvider.DefaultDependencies

java.lang.Object
com.tangosol.net.TcpDatagramSocketProvider.DefaultDependencies
All Implemented Interfaces:
TcpDatagramSocketProvider.Dependencies
Enclosing class:
TcpDatagramSocketProvider

public static class TcpDatagramSocketProvider.DefaultDependencies extends Object implements TcpDatagramSocketProvider.Dependencies
DefaultDependenceis is a basic implementation of the Dependencies interface providing "setter" methods for each property.

Additionally this class serves as a source of default dependency values.

  • Field Details

    • m_delegateSocketProvider

      protected com.oracle.coherence.common.net.SocketProvider m_delegateSocketProvider
      Underlying TCP socket provider
    • m_fBlocking

      protected boolean m_fBlocking
      Specifies if the provider is to produce blocking datagram sockets.
    • m_nAdvanceFrequency

      protected int m_nAdvanceFrequency
      The TcpDatagramSocket advance frequency.
  • Constructor Details

    • DefaultDependencies

      public DefaultDependencies()
      Construct a DefaultDependencies object.
    • DefaultDependencies

      public DefaultDependencies(TcpDatagramSocketProvider.Dependencies deps)
      Construct a DefaultDependencies object copying the values from the specified dependencies object
      Parameters:
      deps - the dependencies to copy, or null
  • Method Details

    • getDelegateSocketProvider

      public com.oracle.coherence.common.net.SocketProvider getDelegateSocketProvider()
      Return the SocketProvider to use in producing the underling sockets which will be wrapped with DatagramSocket.
      Specified by:
      getDelegateSocketProvider in interface TcpDatagramSocketProvider.Dependencies
      Returns:
      the delegate SocketProvider
    • setDelegateSocketProvider

      public TcpDatagramSocketProvider.DefaultDependencies setDelegateSocketProvider(com.oracle.coherence.common.net.SocketProvider provider)
      Set Delegate SocketProvider
      Parameters:
      provider -
    • isBlocking

      public boolean isBlocking()
      Check if datagram sockets should be blocking the use of "blocking" datagram sockets is not meant for production use and this setting should remain undocumented
      Specified by:
      isBlocking in interface TcpDatagramSocketProvider.Dependencies
      Returns:
      true if use blocking sockets
    • setBlocking

      @Injectable("blocking") public void setBlocking(boolean fBlocking)
      Set if datagram socket is blocking
      Parameters:
      fBlocking -
    • getAdvanceFrequency

      public int getAdvanceFrequency()
      Get the frequency at which the DatagramSocket will advance over the sub-sockets during receive
      Specified by:
      getAdvanceFrequency in interface TcpDatagramSocketProvider.Dependencies
      Returns:
      int frequency
    • setAdvanceFrequency

      @Injectable("advance-frequency") public void setAdvanceFrequency(int frequency)
      Set frequency for datagram socket
      Parameters:
      frequency -
    • validate

      Validate the dependencies.
      Returns:
      this object
      Throws:
      IllegalArgumentException - if the dependencies are invalid
    • ensureArgument

      protected static void ensureArgument(Object o, String sName)
      Ensure that the specified object is non-null
      Parameters:
      o - the object to ensure
      sName - the name of the corresponding parameter
      Throws:
      IllegalArgumentException - if o is null