Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net
Class SocketProviderFactory

`java.lang.Object
com.tangosol.net.SocketProviderFactory`

All Implemented Interfaces:
  XmlConfigurable

      public class SocketProviderFactory

extends 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 Map` | `m_mapConfig` A map of provider configurations, key'd by name.
`protected Map` | `m_mapProvider` A map of instantiated providers, key'd by name.
`protected XmlElement` | `m_xml` The configuration.
`static String` | `XML_NAME` The name of the XmlElement in which SocketProviders are specified.
`static 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 Map m_mapConfig

  A map of provider configurations, key'd by name.

### m_mapProvider

    protected 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 String XML_NAME

  The name of the XmlElement in which SocketProviders are specified.
  See Also:
    Constant Field Values

### XML_PROVIDER_NAME

    public static final 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 IOException

  Create and return a SocketProvider based upon a supplied configuration.
  Parameters:
    `xml` - the provider configuration
  Returns:
    the provider
  Throws:
    `IOException` - if the provider cannot be created due to an I/O error

### ensureProvider

    public SocketProvider ensureProvider(XmlElement xml)
                                  throws 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:
    `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

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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