org.sapia.ubik.net.mplex
Interface StreamSelector

All Known Implementing Classes:
HttpStreamSelector, ObjectStreamSelector, PositiveStreamSelector, SimpleStreamSelector

public interface StreamSelector

This interface derfines the contract of a selector that defines, from a preview of a stream of data, if it can handle the entire stream or not. This interface is used by the MultiplexServerSocket to determine which socket connector will handle a new socket connection.

Author:
Jean-Cedric Desrochers
Copyright:
Copyright © 2002-2004 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
MultiplexServerSocket, HttpStreamSelector, ObjectStreamSelector, SimpleStreamSelector

Method Summary
 boolean selectStream(byte[] header)
          Selects or not a stream by analyzing the header of the stream passed in.
 

Method Detail

selectStream

boolean selectStream(byte[] header)
Selects or not a stream by analyzing the header of the stream passed in.

Parameters:
header - The first bytes of the stream.
Returns:
True if the header is accepted by this selector, false otherwise.


Copyright © 2010 Sapia OSS. All Rights Reserved.