|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.servlet.connectionMethods.ChannelTable
A table of Channel elements.
Channel
,
ConnectionMethod
,
StandardConnectionMethod
Field Summary | |
protected java.util.Vector |
channelTable
This is the actual table. |
Constructor Summary | |
ChannelTable()
Constructor |
Method Summary | |
void |
add(Channel channel)
Add a new channel. |
void |
add(java.lang.String channelID,
java.lang.String URLPrefix,
java.lang.String servletID)
Add a new channel. |
void |
delete(java.lang.String channelID)
Delete a channel. |
Channel |
findID(java.lang.String channelID)
Return the Channel for the given identification name. |
Channel |
findURLPrefix(java.lang.String URL)
Search the set of channels for one whose URLPrefix matches the beginning of the given URL. |
Channel |
getChannelByID(java.lang.String channelID)
Return the Channel for the given identification name. |
Channel |
getChannelByURLPrefix(java.lang.String urlPrefix)
Return the Channel for the given URL prefix. |
java.lang.String[] |
getChannelIDs()
Returns the identifier names of all the channels currently in the ChannelTable. |
java.lang.String |
toString()
Return a multi-line string listing the channel ids. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Vector channelTable
Maybe this should be replaced with a public Object, and it should be used for all locking?
Constructor Detail |
public ChannelTable()
Method Detail |
public void add(java.lang.String channelID, java.lang.String URLPrefix, java.lang.String servletID)
channelID
- The symbolic name to use for this channel.URLPrefix
- If a request's URL starts with this string,
it will be sent to the servlet identified by servletID.servletID
- The servlet to send requests to. Use the
ServletManager's get()
method to get the servlet.
Call get()
for each request, do not save a reference
to the servlet.ServletManager
public void add(Channel channel)
channel
- the channel to add.public void delete(java.lang.String channelID)
channelID
- Which channel to remove.public java.lang.String[] getChannelIDs()
public Channel getChannelByID(java.lang.String channelID)
channelID
- Which channel to search for.
public Channel findID(java.lang.String channelID)
channelID
- Which channel to search for.
public Channel getChannelByURLPrefix(java.lang.String urlPrefix)
urlPrefix
- The URL prefix to search for.
public Channel findURLPrefix(java.lang.String URL)
Warning: this method does not synchronize on channelTable. The caller must synchronize on it. Normally you will want to synchronize on it, call this method to look up a Channel, modify the Channel or the table its self, then release the lock on channelTable. That way you know that the table will not change between the time you fetch an entry to the time you modify the entry or the table.
URL
- The URL to try to find a match for.
public java.lang.String toString()
toString
in class java.lang.Object
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |