de.anneck.jcast.listeners
Class ListenerThreadFactory

java.lang.Object
  |
  +--de.anneck.jcast.listeners.ListenerThreadFactory
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, IFactory

public class ListenerThreadFactory
extends java.lang.Object
implements org.apache.avalon.framework.configuration.Configurable, IFactory

This Factory creates ListenerThreads.

Version:
$Revision: 1.7 $
Author:
andre.anneck@web.de

Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
          Configuration for the ThreadFactory.
 void configureThread(org.apache.avalon.framework.configuration.Configuration configuration)
          Configuration for the created Thread.
 java.lang.Object create(java.lang.String listenerThreadName)
          Creates a ListenerThread
 java.lang.Object create(java.lang.String listenerThreadName, IChannel channel)
          Creates a ListenerThread , subscribed to a Channel
 java.lang.Object create(java.lang.String listenerThreadName, IChannel channel, ISource source)
          Creates a ListenerThread , subscribed to a Source in a Channel
static ListenerThreadFactory getInstance()
          Access to singleton via getInstance method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ListenerThreadFactory getInstance()
Access to singleton via getInstance method
Returns:
A ListenerThreadFactory.

create

public java.lang.Object create(java.lang.String listenerThreadName)
Creates a ListenerThread
Parameters:
ListenerThreadName - The name.
Returns:
A new IListenerThread.

create

public java.lang.Object create(java.lang.String listenerThreadName,
                               IChannel channel)
                        throws ListenerException,
                               ChannelException
Creates a ListenerThread , subscribed to a Channel
Parameters:
listenerThreadName - The name.
channel - The IChannel to subscribe to.
Returns:
A new IListenerThread.

create

public java.lang.Object create(java.lang.String listenerThreadName,
                               IChannel channel,
                               ISource source)
                        throws ListenerException,
                               ChannelException
Creates a ListenerThread , subscribed to a Source in a Channel
Parameters:
listenerThreadName - The name.
channel - The IChannel to subscribe to.
source - The ISource to subscribe to.
Returns:
A new IListenerThread.

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Configuration for the ThreadFactory.
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Parameters:
configuration - Configuration object to use.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - Error during configuration.

configureThread

public void configureThread(org.apache.avalon.framework.configuration.Configuration configuration)
                     throws org.apache.avalon.framework.configuration.ConfigurationException
Configuration for the created Thread.
Parameters:
configuration - The configuration object.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - Error during configuration.