Class SocketProviderFactory


  • public class SocketProviderFactory
    extends Object
    The SocketProviderFactory produces SocketProviders.
    Since:
    Coherence 3.6
    Author:
    mf, jh, bb 2010.04.21
    • Field Detail

      • m_mapSocketProvider

        protected Map<String,​com.oracle.coherence.common.net.SocketProvider> m_mapSocketProvider
        A map of instantiated socket providers, keyed by id.
      • m_mapDatagramSocketProvider

        protected Map<String,​DatagramSocketProvider> m_mapDatagramSocketProvider
        A map of instantiated datagram socket providers, keyed by id.
      • DEFAULT_SOCKET_PROVIDER

        public static final com.oracle.coherence.common.net.SocketProvider DEFAULT_SOCKET_PROVIDER
        The factory's default SocketProvider.
      • DEFAULT_LEGACY_SOCKET_PROVIDER

        public static final com.oracle.coherence.common.net.SocketProvider DEFAULT_LEGACY_SOCKET_PROVIDER
        The factory's default legacy SocketProvider.
      • DEFAULT_DATAGRAM_SOCKET_PROVIDER

        public static final DatagramSocketProvider DEFAULT_DATAGRAM_SOCKET_PROVIDER
        The factory's default Datagram SocketProvider.
      • UNNAMED_PROVIDER_ID

        public static final String UNNAMED_PROVIDER_ID
        Default id for unnamed socket and datagram socket providers
        See Also:
        Constant Field Values
      • PROP_GLOBAL_PROVIDER

        public static final String PROP_GLOBAL_PROVIDER
        The name of the system property used to set the global socket provider id.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SocketProviderFactory

        public SocketProviderFactory()
        Construct a SocketProviderFactory
      • SocketProviderFactory

        public SocketProviderFactory​(SocketProviderFactory.Dependencies dependencies)
        Construct a SocketProviderFactory.
        Parameters:
        dependencies - SocketProviderFactory dependencies or null
    • Method Detail

      • getLegacySocketProvider

        @Deprecated
        public com.oracle.coherence.common.net.SocketProvider getLegacySocketProvider​(XmlElement xml)
        Deprecated.
        Return a Socket provider. Only there for Proxy till they move to use MultiplexedSocketProvider
        Parameters:
        xml - provider definition, or null for the default provider
        Returns:
        the provider
      • getSocketProvider

        @Deprecated
        public com.oracle.coherence.common.net.SocketProvider getSocketProvider​(XmlElement xml)
        Deprecated.
        Return a Socket provider
        Parameters:
        xml - provider definition, or null for the default provider
        Returns:
        the provider
      • getSocketProvider

        public com.oracle.coherence.common.net.SocketProvider getSocketProvider​(String sId)
        Return a Socket provider
        Parameters:
        sId - provider name defined in <socket-providers>
        Returns:
        the provider
      • getSocketProvider

        public com.oracle.coherence.common.net.SocketProvider getSocketProvider​(String sId,
                                                                                SocketProviderFactory.Dependencies deps,
                                                                                int nSubport)
        Return a Socket provider
        Parameters:
        sId - provider name defined in <socket-providers>
        deps - anonymous SocketProviderFactory.Dependencies
        nSubport - Sub-port for De-multiplexed socket provider. If it is 0, then it implies Multiplexed socket provider.
        Returns:
        the provider
      • getDemultiplexedSocketProvider

        @Deprecated
        public com.oracle.coherence.common.net.SocketProvider getDemultiplexedSocketProvider​(XmlElement xml,
                                                                                             int nSubport)
        Deprecated.
        Return a Demultiplexed Socket provider
        Parameters:
        xml - provider definition, or null for the default provider
        nSubport - subport for demultiplexed socket provider.
        Returns:
        the provider
      • getDemultiplexedSocketProvider

        public com.oracle.coherence.common.net.SocketProvider getDemultiplexedSocketProvider​(String sId,
                                                                                             SocketProviderFactory.Dependencies deps,
                                                                                             int nSubport,
                                                                                             boolean fCanUseGlobal)
        Return a Demultiplexed Socket provider
        Parameters:
        sId - provider definition identifier or UNNAMED_PROVIDER_ID for inlined, anonymous socket provider
        deps - inlined socket provider dependencies, must be non-null if sId is set to UNNAMED_PROVIDER_ID
        nSubport - subport for demultiplexed socket provider
        fCanUseGlobal - true if the global socket provider can be used
        Returns:
        a DemultiplexedSocketProvider based on method parameters.
      • getDemultiplexedSocketProvider

        public com.oracle.coherence.common.net.SocketProvider getDemultiplexedSocketProvider​(SocketProviderBuilder builder,
                                                                                             int nSubport)
        Return a Demultiplexed Socket provider
        Parameters:
        builder - use socket provider id and dependencies from this SocketProviderBuilder
        nSubport - subport for demultiplexed socket provider.
        Returns:
        a DemultiplexedSocketProvider based on method parameters.
      • getDatagramSocketProvider

        @Deprecated
        public DatagramSocketProvider getDatagramSocketProvider​(XmlElement xml,
                                                                int nSubport)
        Deprecated.
        Return an instance of the specified DatagramSocketProvider, creating it if necessary.
        Parameters:
        xml - the provider definition, or null for the default provider
        nSubport - subport for a demultiplexed socket provider.
        Returns:
        the provider
      • getSSLSettings

        @Deprecated
        public com.oracle.coherence.common.net.SSLSettings getSSLSettings​(XmlElement xml)
        Deprecated.
        Return an instance of SSLSettings from the specified xml.
        Parameters:
        xml - the provider definition, or null for the default provider
        Returns:
        the sslSettings
      • getSSLSettings

        public com.oracle.coherence.common.net.SSLSettings getSSLSettings​(com.oracle.coherence.common.net.SocketProvider socketProvider)
        Return SSLSettings for the specified SocketProvider.
        Parameters:
        socketProvider - the socketProvider
        Returns:
        the sslSettings if the socket provider is an instance of SSLSocketProvider or null
      • getSSLSettings

        public com.oracle.coherence.common.net.SSLSettings getSSLSettings​(SocketProviderBuilder builder)
        Return SSLSettings for the specified SocketProviderBuilder.
        Parameters:
        builder - the socketProviderBuilder
        Returns:
        the sslSettings if the socket provider builder has a ssl settings directly or via delegate.
      • createSSLSettings

        public static com.oracle.coherence.common.net.SSLSettings createSSLSettings​(com.oracle.coherence.common.net.SSLSocketProvider.Dependencies depsSSL)
        Return an SSLSettings initialize via SSLSocketProvider.Dependencies
        Parameters:
        depsSSL - SSL Dependencies info
        Returns:
        a new SSLSettings initialized via depsSSL
      • ensureSocketProvider

        protected com.oracle.coherence.common.net.SocketProvider ensureSocketProvider​(String sId,
                                                                                      SocketProviderFactory.Dependencies deps,
                                                                                      int nSubport)
        Create SocketProvider
        Parameters:
        sId - SocketProviderId
        deps - Dependencies for the given SocketProvider
        nSubport - Subport for Demultiplexed socket provider. If it is 0, then it implies Multiplexed socket provider.
        Returns:
        the SocketProvider
      • ensureDatagramSocketProvider

        protected DatagramSocketProvider ensureDatagramSocketProvider​(String sId,
                                                                      SocketProviderFactory.Dependencies providerDeps,
                                                                      int nSubport)
        Parameters:
        sId - DatagramSocketProviderId
        providerDeps - Dependencies for the given DatagramSocketProvider
        nSubport - Subport for Demultiplexed socket provider. If it is 0, then it implies Multiplexed socket provider.
        Returns:
        the DatagramSocketProvider