|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectautohit.common.channels.SimpleChannel
Channel implementation Supports a simple, exclusive channel. There is no routing, but just a single priority level and type. Everything less than or equal to the priority set will match. Type is unimportant. It will accept multiple injectors, but only one Drain. Registering a new drain will replace the old. Only injection is thread safe. Nothing else is.
The injectors are unimporant. We'll just toss them in a table and let them rot.
EPG - Initial - 25Apr03
Field Summary |
Fields inherited from interface autohit.common.channels.Channel |
BAD_RECEIPT |
Constructor Summary | |
SimpleChannel()
Default constructor |
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 priority level for named Drain |
Receipt |
requestType(java.lang.String name,
int type)
Request type |
Receipt |
setExclusive(java.lang.String name)
Set exclusive |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleChannel()
Method Detail |
public void register(java.lang.String name, Injector i) throws ChannelException
register
in interface Channel
name
- referencei
- An injector
ChannelException
Injector
public void register(java.lang.String name, Drain d) throws ChannelException
register
in interface Channel
name
- referenced
- A drain
ChannelException
Drain
public Drain getDrain(java.lang.String name) throws ChannelException
getDrain
in interface Channel
name
- Name reference to the drain
ChannelException
Drain
public Injector getInjector(java.lang.String name) throws ChannelException
getInjector
in interface Channel
name
- Name reference to the injector
ChannelException
Drain
public void removeInjector(java.lang.String name) throws ChannelException
removeInjector
in interface Channel
name
- reference
ChannelException
Injector
public void removeDrain(java.lang.String name) throws ChannelException
removeDrain
in interface Channel
name
- reference
ChannelException
Drain
public Receipt inject(Atom a) throws ChannelException
inject
in interface Channel
a
- An item
ChannelException
public Receipt requestLevel(java.lang.String name, int level) throws ChannelException
requestLevel
in interface Channel
name
- Drain's namelevel
- the level as specifies in an Atom
ChannelException
Atom
public Receipt removeLevel(java.lang.String name, int level) throws ChannelException
removeLevel
in interface Channel
name
- Drain's namelevel
- the level as specifies in an Atom
ChannelException
Atom
public Receipt requestType(java.lang.String name, int type) throws ChannelException
requestType
in interface Channel
name
- Drain's nametype
- the type as specified in Atom
ChannelException
Atom
public Receipt removeType(java.lang.String name, int type) throws ChannelException
removeType
in interface Channel
name
- Drain's nametype
- the type as specified in Atom
ChannelException
Atom
public Receipt setExclusive(java.lang.String name) throws ChannelException
setExclusive
in interface Channel
name
- Drain's name
ChannelException
public Receipt removeExclusive(java.lang.String name) throws ChannelException
removeExclusive
in interface Channel
name
- Drain's name
ChannelException
public java.util.Enumeration enumInjector() throws ChannelException
enumInjector
in interface Channel
ChannelException
Injector
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |