|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.net.mplex.HttpStreamSelector
public class HttpStreamSelector
Implements a selection logic for HTTP requests. By default this selector will choose
all HTTP request, as it looks for the token "HTTP/" as specified by the HTTP specification.
This selector also gives the functionaly to select only a given HTTP method (like POST or
GET) and/or to specify a pattern for the HTTP request path. If specify this request pattern
must be the first characters of the request path to select (without any starts or regex
expression). The current logic to determine if the request pattern matches is done using
the startsWith() method of the java.lang.String object.
| Constructor Summary | |
|---|---|
HttpStreamSelector()
Creates a new HtpStreamSelector instance that will select any HTTP request. |
|
HttpStreamSelector(java.lang.String aMethod,
java.lang.String aRequestPattern)
Creates a new HtpStreamSelector instance that will select an HTTP request based on the criterias passed in. |
|
| Method Summary | |
|---|---|
boolean |
selectStream(byte[] header)
Selects or not a stream by analyzing the header of the stream passed in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpStreamSelector()
public HttpStreamSelector(java.lang.String aMethod,
java.lang.String aRequestPattern)
aMethod - The specific HTTP method to discrimate on, or null
for any type of HTTP method.aRequestPattern - The simple pattern that defines the starting request path
of the HTTP request. For example the value "/sapia/example" would select the
path "/sapia/example/index.html" and also "/sapia/example/service/myWebService".
Passing null will make this selector choose any request path.| Method Detail |
|---|
public boolean selectStream(byte[] header)
selectStream in interface StreamSelectorheader - The first 64 bytes of the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||