1 |
|
/*
|
|
|
|
|
|
|
|
|
2 |
|
* License
d to the A
pache Soft
ware Found
ation (ASF
) under on
e or more
|
|
|
|
|
|
|
|
|
3 |
|
* contrib
utor licen
se agreeme
nts. See
the NOTICE
file dist
ributed wi
th
|
|
|
|
|
|
|
|
|
4 |
|
* this wo
rk for add
itional in
formation
regarding
copyright
ownership.
|
|
|
|
|
|
|
|
|
5 |
|
* The ASF
licenses
this file
to You und
er the Apa
che Licens
e, Version
2.0
|
|
|
|
|
|
|
|
|
6 |
|
* (the "L
icense");
you may no
t use this
file exce
pt in comp
liance wit
h
|
|
|
|
|
|
|
|
|
7 |
|
* the Lic
ense. You
may obtai
n a copy o
f the Lice
nse at
|
|
|
|
|
|
|
|
|
8 |
|
*
|
|
|
|
|
|
|
|
|
9 |
|
* ht
tp://www.a
pache.org/
licenses/L
ICENSE-2.0
|
|
|
|
|
|
|
|
|
10 |
|
*
|
|
|
|
|
|
|
|
|
11 |
|
* Unless
required b
y applicab
le law or
agreed to
in writing
, software
|
|
|
|
|
|
|
|
|
12 |
|
* distrib
uted under
the Licen
se is dist
ributed on
an "AS IS
" BASIS,
|
|
|
|
|
|
|
|
|
13 |
|
* WITHOUT
WARRANTIE
S OR CONDI
TIONS OF A
NY KIND, e
ither expr
ess or imp
lied.
|
|
|
|
|
|
|
|
|
14 |
|
* See the
License f
or the spe
cific lang
uage gover
ning permi
ssions and
|
|
|
|
|
|
|
|
|
15 |
|
* limitat
ions under
the Licen
se.
|
|
|
|
|
|
|
|
|
16 |
|
*/
|
|
|
|
|
|
|
|
|
17 |
|
|
|
|
|
|
|
|
|
|
18 |
|
|
|
|
|
|
|
|
|
|
19 |
|
package or
g.apache.c
atalina.co
met;
|
|
|
|
|
|
|
|
|
20 |
|
|
|
|
|
|
|
|
|
|
21 |
|
import jav
a.io.IOExc
eption;
|
|
|
|
|
|
|
|
|
22 |
|
|
|
|
|
|
|
|
|
|
23 |
|
import jav
ax.servlet
.Servlet;
|
|
|
|
|
|
|
|
|
24 |
|
import jav
ax.servlet
.ServletEx
ception;
|
|
|
|
|
|
|
|
|
25 |
|
|
|
|
|
|
|
|
|
|
26 |
|
/**
|
|
|
|
|
|
|
|
|
27 |
|
* This in
terface sh
ould be im
plemented
by servlet
s which wo
uld like t
o handle
|
|
|
|
|
|
|
|
|
28 |
|
* asynchr
onous IO,
receiving
events whe
n data is
available
for readin
g, and
|
|
|
|
|
|
|
|
|
29 |
|
* being a
ble to out
put data w
ithout the
need for
being invo
ked by the
container
.
|
|
|
|
|
|
|
|
|
30 |
|
* Note: W
hen this i
nterface i
s implemen
ted, the s
ervice met
hod of the
servlet w
ill
|
|
|
|
|
|
|
|
|
31 |
|
* never b
e called,
and will b
e replaced
with a be
gin event.
|
|
|
|
|
|
|
|
|
32 |
|
*/
|
|
|
|
|
|
|
|
|
33 |
|
public int
erface Com
etProcesso
r extends
Servlet{
|
|
|
|
|
|
|
|
|
34 |
|
|
|
|
|
|
|
|
|
|
35 |
|
/**
|
|
|
|
|
|
|
|
|
36 |
|
* Pro
cess the g
iven Comet
event.
|
|
|
|
|
|
|
|
|
37 |
|
*
|
|
|
|
|
|
|
|
|
38 |
|
* @pa
ram event
The Comet
event that
will be p
rocessed
|
|
|
|
|
|
|
|
|
39 |
|
* @th
rows IOExc
eption
|
|
|
|
|
|
|
|
|
40 |
|
* @th
rows Servl
etExceptio
n
|
|
|
|
|
|
|
|
|
41 |
|
*/
|
|
|
|
|
|
|
|
|
42 |
|
public
void even
t(CometEve
nt event)
|
|
|
|
|
|
|
|
|
43 |
|
th
rows IOExc
eption, Se
rvletExcep
tion;
|
|
|
|
|
|
|
|
|
44 |
|
|
|
|
|
|
|
|
|
|
45 |
|
}
|
|
|
|
|
|
|
|
|