Package com.tangosol.net
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 Summary
Modifier and TypeFieldDescriptionprotected com.oracle.coherence.common.net.SocketProvider
Underlying TCP socket providerprotected boolean
Specifies if the provider is to produce blocking datagram sockets.protected int
The TcpDatagramSocket advance frequency. -
Constructor Summary
ConstructorDescriptionConstruct a DefaultDependencies object.Construct a DefaultDependencies object copying the values from the specified dependencies object -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
ensureArgument
(Object o, String sName) Ensure that the specified object is non-nullint
Get the frequency at which the DatagramSocket will advance over the sub-sockets during receivecom.oracle.coherence.common.net.SocketProvider
Return the SocketProvider to use in producing the underling sockets which will be wrapped with DatagramSocket.boolean
Check if datagram sockets should be blocking the use of "blocking" datagram sockets is not meant for production use and this setting should remain undocumentedvoid
setAdvanceFrequency
(int frequency) Set frequency for datagram socketvoid
setBlocking
(boolean fBlocking) Set if datagram socket is blockingsetDelegateSocketProvider
(com.oracle.coherence.common.net.SocketProvider provider) Set Delegate SocketProvidervalidate()
Validate the dependencies.
-
Field Details
-
m_delegateSocketProvider
protected com.oracle.coherence.common.net.SocketProvider m_delegateSocketProviderUnderlying TCP socket provider -
m_fBlocking
protected boolean m_fBlockingSpecifies if the provider is to produce blocking datagram sockets. -
m_nAdvanceFrequency
protected int m_nAdvanceFrequencyThe TcpDatagramSocket advance frequency.
-
-
Constructor Details
-
DefaultDependencies
public DefaultDependencies()Construct a DefaultDependencies object. -
DefaultDependencies
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 interfaceTcpDatagramSocketProvider.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 interfaceTcpDatagramSocketProvider.Dependencies
- Returns:
- true if use blocking sockets
-
setBlocking
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 interfaceTcpDatagramSocketProvider.Dependencies
- Returns:
- int frequency
-
setAdvanceFrequency
Set frequency for datagram socket- Parameters:
frequency
-
-
validate
Validate the dependencies.- Returns:
- this object
- Throws:
IllegalArgumentException
- if the dependencies are invalid
-
ensureArgument
Ensure that the specified object is non-null- Parameters:
o
- the object to ensuresName
- the name of the corresponding parameter- Throws:
IllegalArgumentException
- if o is null
-