org.apache.avalon.cornerstone.blocks.sockets
Class DefaultSocketManager
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLogEnabled
|
+--org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager
- All Implemented Interfaces:
- Configurable, Contextualizable, Initializable, LogEnabled, org.apache.avalon.cornerstone.services.sockets.SocketManager
- public class DefaultSocketManager
- extends AbstractLogEnabled
- implements org.apache.avalon.cornerstone.services.sockets.SocketManager, Contextualizable, Configurable, Initializable
Implementation of SocketManager.
- Author:
- Federico Barbieri, Peter Donald
Fields inherited from interface org.apache.avalon.cornerstone.services.sockets.SocketManager |
ROLE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_serverSockets
protected final HashMap m_serverSockets
m_sockets
protected final HashMap m_sockets
m_context
protected Context m_context
m_configuration
protected Configuration m_configuration
DefaultSocketManager
public DefaultSocketManager()
contextualize
public void contextualize(Context context)
- Specified by:
contextualize
in interface Contextualizable
configure
public void configure(Configuration configuration)
throws ConfigurationException
- Configure the SocketManager.
- Specified by:
configure
in interface Configurable
- Parameters:
configuration
- the Configuration
- Throws:
ConfigurationException
- if an error occurs
initialize
public void initialize()
throws Exception
- Specified by:
initialize
in interface Initializable
Exception
setupServerSocketFactory
protected void setupServerSocketFactory(String name,
String className,
Configuration configuration)
throws Exception
Exception
setupClientSocketFactory
protected void setupClientSocketFactory(String name,
String className,
Configuration configuration)
throws Exception
Exception
createFactory
protected Object createFactory(String name,
String className,
Configuration configuration)
throws Exception
Exception
getServerSocketFactory
public org.apache.avalon.cornerstone.services.sockets.ServerSocketFactory getServerSocketFactory(String name)
throws Exception
- Retrieve a server socket factory by name.
- Specified by:
getServerSocketFactory
in interface org.apache.avalon.cornerstone.services.sockets.SocketManager
- Parameters:
name
- the name of server socket factory
- Returns:
- the ServerSocketFactory
- Throws:
Exception
- if server socket factory is not available
getSocketFactory
public org.apache.avalon.cornerstone.services.sockets.SocketFactory getSocketFactory(String name)
throws Exception
- Retrieve a client socket factory by name.
- Specified by:
getSocketFactory
in interface org.apache.avalon.cornerstone.services.sockets.SocketManager
- Parameters:
name
- the name of client socket factory
- Returns:
- the SocketFactory
- Throws:
Exception
- if socket factory is not available
Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.