Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.net
Class SocketProviderFactory

java.lang.Object
  extended by com.tangosol.net.SocketProviderFactory

All Implemented Interfaces:
XmlConfigurable

public class SocketProviderFactory
extends java.lang.Object
implements XmlConfigurable

The SocketProviderFactory produces SocketProviders.

Since:
Coherence 3.6
Author:
mf, jh 2010.04.21

Field Summary
static SocketProvider DEFAULT_PROVIDER
          The factory's default SocketProvider.
protected  java.util.Map m_mapConfig
          A map of provider configurations, key'd by name.
protected  java.util.Map m_mapProvider
          A map of instantiated providers, key'd by name.
protected  XmlElement m_xml
          The configuration.
static java.lang.String XML_NAME
          The name of the XmlElement in which SocketProviders are specified.
static java.lang.String XML_PROVIDER_NAME
          The name of the XmlElement in which each SocketProvider is specified.

 

Constructor Summary
SocketProviderFactory()
           

 

Method Summary
 SocketProvider createProvider(XmlElement xml)
          Create and return a SocketProvider based upon a supplied configuration.
 SocketProvider ensureProvider(XmlElement xml)
          Return an instance of the specified provider, creating it if necessary.
 XmlElement getConfig()
          Determine the current configuration of the object.
 void setConfig(XmlElement xml)
          Specify the configuration for the object.

 

Field Detail

m_xml

protected XmlElement m_xml
The configuration.

m_mapConfig

protected java.util.Map m_mapConfig
A map of provider configurations, key'd by name.

m_mapProvider

protected java.util.Map m_mapProvider
A map of instantiated providers, key'd by name.

DEFAULT_PROVIDER

public static final SocketProvider DEFAULT_PROVIDER
The factory's default SocketProvider.

XML_NAME

public static final java.lang.String XML_NAME
The name of the XmlElement in which SocketProviders are specified.
See Also:
Constant Field Values

XML_PROVIDER_NAME

public static final java.lang.String XML_PROVIDER_NAME
The name of the XmlElement in which each SocketProvider is specified.
See Also:
Constant Field Values

Constructor Detail

SocketProviderFactory

public SocketProviderFactory()

Method Detail

createProvider

public SocketProvider createProvider(XmlElement xml)
                              throws java.io.IOException
Create and return a SocketProvider based upon a supplied configuration.
Parameters:
xml - the provider configuration
Returns:
the provider
Throws:
java.io.IOException - if the provider cannot be created due to an I/O error

ensureProvider

public SocketProvider ensureProvider(XmlElement xml)
                              throws java.io.IOException
Return an instance of the specified provider, creating it if necessary.
Parameters:
xml - the provider definition, or null for the default provider
Returns:
the provider
Throws:
java.io.IOException - if an I/O error occurs

getConfig

public XmlElement getConfig()
Determine the current configuration of the object.
Specified by:
getConfig in interface XmlConfigurable
Returns:
the XML configuration or null

setConfig

public void setConfig(XmlElement xml)
Specify the configuration for the object.
Specified by:
setConfig in interface XmlConfigurable
Parameters:
xml - the XML configuration for the object

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.