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
FieldsModifier and TypeFieldDescriptionprotected com.oracle.coherence.common.net.SocketProviderUnderlying TCP socket providerprotected booleanSpecifies if the provider is to produce blocking datagram sockets.protected intThe TcpDatagramSocket advance frequency. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a DefaultDependencies object.Construct a DefaultDependencies object copying the values from the specified dependencies object -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidensureArgument(Object o, String sName) Ensure that the specified object is non-nullintGet the frequency at which the DatagramSocket will advance over the sub-sockets during receivecom.oracle.coherence.common.net.SocketProviderReturn the SocketProvider to use in producing the underling sockets which will be wrapped with DatagramSocket.booleanCheck if datagram sockets should be blocking the use of "blocking" datagram sockets is not meant for production use and this setting should remain undocumentedvoidsetAdvanceFrequency(int frequency) Set frequency for datagram socketvoidsetBlocking(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:
getDelegateSocketProviderin 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:
isBlockingin 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:
getAdvanceFrequencyin 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
-