|
TopoWeb Commons API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.topoweb.net.server.XmlTailDetector
Detects the presence of the tail of an XML element in the Session bytes read in. This class can be used with a SessionReader if every client request is terminated by a character
sequence that forms the tail of an XML element. If non-whitespace
characters following the tail of the XML element are read into the passed
in Session, then the requestCompleted method will fail (return false).
| Constructor Summary | |
XmlTailDetector(java.lang.String tag)
Creates a new instance with the specified tag name. |
|
| Method Summary | |
boolean |
requestCompleted(Session session)
Tests whether enough bytes have been read into the given session to form a request. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XmlTailDetector(java.lang.String tag)
tag - the tag name of the element
java.lang.IllegalArgumentException - if tag is null;
if a test indicates that tag is
malformed| Method Detail |
public boolean requestCompleted(Session session)
RequestBoundaryDetectorsession to form a request.
requestCompleted in interface RequestBoundaryDetectorsession - the Session inspected
true, if there are enough
bytes in the given session
to form an interpretable request;
false, o.w.Session.getReadArray(),
Session.getReadAmount()
|
TopoWeb Commons API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||