autohit.common.channels
Interface Channel

All Known Implementing Classes:
SimpleChannel

public interface Channel

Channel interface

Version:
1.0 Version History EPG - Initial - 25Apr03
Author:
Erich P. Gatejen

Field Summary
static java.lang.String BAD_RECEIPT
          Constants
 
Method Summary
 java.util.Enumeration enumInjector()
          Enumerate injectors
 Drain getDrain(java.lang.String name)
          Get a drain by name
 Injector getInjector(java.lang.String name)
          Get an injector by name
 Receipt inject(Atom a)
          Typically called by an injector
 void register(java.lang.String name, Drain d)
          Register a drain
 void register(java.lang.String name, Injector i)
          Register an injector
 void removeDrain(java.lang.String name)
          Remove a drain
 Receipt removeExclusive(java.lang.String name)
          Remove exclusive
 void removeInjector(java.lang.String name)
          Remove an injector
 Receipt removeLevel(java.lang.String name, int level)
          Remove level for named Drain
 Receipt removeType(java.lang.String name, int type)
          Request type
 Receipt requestLevel(java.lang.String name, int level)
          Request level for named Drain
 Receipt requestType(java.lang.String name, int type)
          Request type
 Receipt setExclusive(java.lang.String name)
          Set exclusive
 

Field Detail

BAD_RECEIPT

public static final java.lang.String BAD_RECEIPT
Constants

See Also:
Constant Field Values
Method Detail

register

public void register(java.lang.String name,
                     Injector i)
              throws ChannelException
Register an injector

Parameters:
name - reference
i - An injector
Throws:
ChannelException
See Also:
Injector

register

public void register(java.lang.String name,
                     Drain d)
              throws ChannelException
Register a drain

Parameters:
name - reference
d - A drain
Throws:
ChannelException
See Also:
Drain

getDrain

public Drain getDrain(java.lang.String name)
               throws ChannelException
Get a drain by name

Parameters:
name - Name reference to the drain
Returns:
Drain reference or null if not found
Throws:
ChannelException
See Also:
Drain

getInjector

public Injector getInjector(java.lang.String name)
                     throws ChannelException
Get an injector by name

Parameters:
name - Name reference to the injector
Returns:
Injector reference or null if not found
Throws:
ChannelException
See Also:
Drain

enumInjector

public java.util.Enumeration enumInjector()
                                   throws ChannelException
Enumerate injectors

Returns:
an enumeration of injectors
Throws:
ChannelException
See Also:
Injector

removeInjector

public void removeInjector(java.lang.String name)
                    throws ChannelException
Remove an injector

Parameters:
name - reference
Throws:
ChannelException
See Also:
Injector

removeDrain

public void removeDrain(java.lang.String name)
                 throws ChannelException
Remove a drain

Parameters:
name - reference
Throws:
ChannelException
See Also:
Drain

inject

public Receipt inject(Atom a)
               throws ChannelException
Typically called by an injector

Parameters:
a - An item
Throws:
ChannelException

requestLevel

public Receipt requestLevel(java.lang.String name,
                            int level)
                     throws ChannelException
Request level for named Drain

Parameters:
name - Drain's name
level - the level as specifies in an Atom
Throws:
ChannelException
See Also:
Atom

removeLevel

public Receipt removeLevel(java.lang.String name,
                           int level)
                    throws ChannelException
Remove level for named Drain

Parameters:
name - Drain's name
level - the level as specifies in an Atom
Throws:
ChannelException
See Also:
Atom

requestType

public Receipt requestType(java.lang.String name,
                           int type)
                    throws ChannelException
Request type

Parameters:
name - Drain's name
type - the type as specified in Atom
Throws:
ChannelException
See Also:
Atom

removeType

public Receipt removeType(java.lang.String name,
                          int type)
                   throws ChannelException
Request type

Parameters:
name - Drain's name
type - the type as specified in Atom
Throws:
ChannelException
See Also:
Atom

setExclusive

public Receipt setExclusive(java.lang.String name)
                     throws ChannelException
Set exclusive

Parameters:
name - Drain's name
Throws:
ChannelException

removeExclusive

public Receipt removeExclusive(java.lang.String name)
                        throws ChannelException
Remove exclusive

Parameters:
name - Drain's name
Throws:
ChannelException


Test.