|
|||||||||||
| 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 Channelname - referencei - An injector
ChannelExceptionInjector
public void register(java.lang.String name,
Drain d)
throws ChannelException
register in interface Channelname - referenced - A drain
ChannelExceptionDrain
public Drain getDrain(java.lang.String name)
throws ChannelException
getDrain in interface Channelname - Name reference to the drain
ChannelExceptionDrain
public Injector getInjector(java.lang.String name)
throws ChannelException
getInjector in interface Channelname - Name reference to the injector
ChannelExceptionDrain
public void removeInjector(java.lang.String name)
throws ChannelException
removeInjector in interface Channelname - reference
ChannelExceptionInjector
public void removeDrain(java.lang.String name)
throws ChannelException
removeDrain in interface Channelname - reference
ChannelExceptionDrain
public Receipt inject(Atom a)
throws ChannelException
inject in interface Channela - An item
ChannelException
public Receipt requestLevel(java.lang.String name,
int level)
throws ChannelException
requestLevel in interface Channelname - Drain's namelevel - the level as specifies in an Atom
ChannelExceptionAtom
public Receipt removeLevel(java.lang.String name,
int level)
throws ChannelException
removeLevel in interface Channelname - Drain's namelevel - the level as specifies in an Atom
ChannelExceptionAtom
public Receipt requestType(java.lang.String name,
int type)
throws ChannelException
requestType in interface Channelname - Drain's nametype - the type as specified in Atom
ChannelExceptionAtom
public Receipt removeType(java.lang.String name,
int type)
throws ChannelException
removeType in interface Channelname - Drain's nametype - the type as specified in Atom
ChannelExceptionAtom
public Receipt setExclusive(java.lang.String name)
throws ChannelException
setExclusive in interface Channelname - Drain's name
ChannelException
public Receipt removeExclusive(java.lang.String name)
throws ChannelException
removeExclusive in interface Channelname - Drain's name
ChannelException
public java.util.Enumeration enumInjector()
throws ChannelException
enumInjector in interface ChannelChannelExceptionInjector
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||