01: // MuxStreamHandler.java
02: // $Id: MuxStreamHandler.java,v 1.4 2000/08/16 21:38:01 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1996.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.www.mux;
07:
08: public interface MuxStreamHandler {
09:
10: /**
11: * Someone has contacted us to speak that protocol, what should we do ?
12: * This method gets called by a MuxStream instance when a new session
13: * willing to speak some protocol is about to be established.
14: * @param stream The stream on which that new session establishment was
15: * received.
16: * @param sessid The proposed session identifier for that new session.
17: * @param protid The protocol identifier of the protocol to be
18: * spoken on that session.
19: */
20:
21: public boolean acceptSession(MuxStream stream, int sessid,
22: int protid);
23:
24: /**
25: * A new session has been accepted, and is now ready to run.
26: * This method should setup an appropriate protocol handler to deal with
27: * the protocol specific to the given session.
28: * @param session The session that has been accepted.
29: */
30:
31: public void notifySession(MuxSession session);
32:
33: }
|