KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mortbay > util > OutputObserver


1 // ========================================================================
2
// $Id: OutputObserver.java,v 1.3 2004/05/09 20:32:49 gregwilkins Exp $
3
// Copyright 1999-2004 Mort Bay Consulting Pty. Ltd.
4
// ------------------------------------------------------------------------
5
// Licensed under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
// ========================================================================
15

16 package org.mortbay.util;
17
18 import java.io.IOException JavaDoc;
19 import java.io.OutputStream JavaDoc;
20
21 /* ------------------------------------------------------------ */
22 /** Observer output events.
23  *
24  * @see org.mortbay.http.HttpOutputStream
25  * @version $Id: OutputObserver.java,v 1.3 2004/05/09 20:32:49 gregwilkins Exp $
26  * @author Greg Wilkins (gregw)
27  */

28 public interface OutputObserver
29 {
30     public final static int
31         __FIRST_WRITE=0,
32         __RESET_BUFFER=1,
33         __COMMITING=2,
34         __CLOSING=4,
35         __CLOSED=5;
36     
37     /* ------------------------------------------------------------ */
38     /** Notify an output action.
39      * @param out The OutputStream that caused the event
40      * @param action The action taken
41      * @param data Data associated with the event.
42      */

43     void outputNotify(OutputStream JavaDoc out, int action, Object JavaDoc data)
44         throws IOException JavaDoc;
45 }
46
Popular Tags