No regular expressions were active.
| 1 |
|
/*
|
|
1 |
|
/*
|
| 2 |
|
*
$Header:
/home/cvs/
jakarta-to
mcat-4.0/c
atalina/sr
c/share/or
g/apache/c
atalina/co
nnector/ht
tp10/HttpC
onnector.j
ava,v
1.1
2
200
1
/0
9
/1
1
1
7:
33
:
0
2
c
r
aig
m
cc
Exp
$
|
|
2 |
|
*
$Header:
/home/cvs/
jakarta-to
mcat-4.0/c
atalina/sr
c/share/or
g/apache/c
atalina/co
nnector/ht
tp10/HttpC
onnector.j
ava,v
1.1
7
200
2
/0
3
/1
8
0
7:
15
:
4
0
r
em
m
Exp
$
|
| 3 |
|
*
$Revision:
1.1
2
$
|
|
3 |
|
*
$Revision:
1.1
7
$
|
| 4 |
|
*
$Date:
200
1
/0
9
/1
1
1
7:
33
:
0
2
$
|
|
4 |
|
*
$Date:
200
2
/0
3
/1
8
0
7:
15
:
4
0
$
|
| 5 |
|
*
|
|
5 |
|
*
|
| 6 |
|
* =======
==========
==========
==========
==========
==========
==========
=
|
|
6 |
|
* =======
==========
==========
==========
==========
==========
==========
=
|
| 7 |
|
*
|
|
7 |
|
*
|
| 8 |
|
* The Apa
che Softwa
re License
, Version
1.1
|
|
8 |
|
* The Apa
che Softwa
re License
, Version
1.1
|
| 9 |
|
*
|
|
9 |
|
*
|
| 10 |
|
* Copyrig
ht (c) 199
9 The Apac
he Softwar
e Foundati
on. All r
ights
|
|
10 |
|
* Copyrig
ht (c) 199
9 The Apac
he Softwar
e Foundati
on. All r
ights
|
| 11 |
|
* reserve
d.
|
|
11 |
|
* reserve
d.
|
| 12 |
|
*
|
|
12 |
|
*
|
| 13 |
|
* Redistr
ibution an
d use in s
ource and
binary for
ms, with o
r without
|
|
13 |
|
* Redistr
ibution an
d use in s
ource and
binary for
ms, with o
r without
|
| 14 |
|
* modific
ation, are
permitted
provided
that the f
ollowing c
onditions
|
|
14 |
|
* modific
ation, are
permitted
provided
that the f
ollowing c
onditions
|
| 15 |
|
* are met
:
|
|
15 |
|
* are met
:
|
| 16 |
|
*
|
|
16 |
|
*
|
| 17 |
|
* 1. Redi
stribution
s of sourc
e code mus
t retain t
he above c
opyright
|
|
17 |
|
* 1. Redi
stribution
s of sourc
e code mus
t retain t
he above c
opyright
|
| 18 |
|
* noti
ce, this l
ist of con
ditions an
d the foll
owing disc
laimer.
|
|
18 |
|
* noti
ce, this l
ist of con
ditions an
d the foll
owing disc
laimer.
|
| 19 |
|
*
|
|
19 |
|
*
|
| 20 |
|
* 2. Redi
stribution
s in binar
y form mus
t reproduc
e the abov
e copyrigh
t
|
|
20 |
|
* 2. Redi
stribution
s in binar
y form mus
t reproduc
e the abov
e copyrigh
t
|
| 21 |
|
* noti
ce, this l
ist of con
ditions an
d the foll
owing disc
laimer in
|
|
21 |
|
* noti
ce, this l
ist of con
ditions an
d the foll
owing disc
laimer in
|
| 22 |
|
* the
documentat
ion and/or
other mat
erials pro
vided with
the
|
|
22 |
|
* the
documentat
ion and/or
other mat
erials pro
vided with
the
|
| 23 |
|
* dist
ribution.
|
|
23 |
|
* dist
ribution.
|
| 24 |
|
*
|
|
24 |
|
*
|
| 25 |
|
* 3. The
end-user d
ocumentati
on include
d with the
redistrib
ution, if
|
|
25 |
|
* 3. The
end-user d
ocumentati
on include
d with the
redistrib
ution, if
|
| 26 |
|
* any,
must incl
ude the fo
llowing ac
knowlegeme
nt:
|
|
26 |
|
* any,
must incl
ude the fo
llowing ac
knowlegeme
nt:
|
| 27 |
|
* "
This produ
ct include
s software
developed
by the
|
|
27 |
|
* "
This produ
ct include
s software
developed
by the
|
| 28 |
|
*
Apache Sof
tware Foun
dation (ht
tp://www.a
pache.org/
)."
|
|
28 |
|
*
Apache Sof
tware Foun
dation (ht
tp://www.a
pache.org/
)."
|
| 29 |
|
* Alte
rnately, t
his acknow
legement m
ay appear
in the sof
tware itse
lf,
|
|
29 |
|
* Alte
rnately, t
his acknow
legement m
ay appear
in the sof
tware itse
lf,
|
| 30 |
|
* if a
nd whereve
r such thi
rd-party a
cknowlegem
ents norma
lly appear
.
|
|
30 |
|
* if a
nd whereve
r such thi
rd-party a
cknowlegem
ents norma
lly appear
.
|
| 31 |
|
*
|
|
31 |
|
*
|
| 32 |
|
* 4. The
names "The
Jakarta P
roject", "
Tomcat", a
nd "Apache
Software
|
|
32 |
|
* 4. The
names "The
Jakarta P
roject", "
Tomcat", a
nd "Apache
Software
|
| 33 |
|
* Foun
dation" mu
st not be
used to en
dorse or p
romote pro
ducts deri
ved
|
|
33 |
|
* Foun
dation" mu
st not be
used to en
dorse or p
romote pro
ducts deri
ved
|
| 34 |
|
* from
this soft
ware witho
ut prior w
ritten per
mission. F
or written
|
|
34 |
|
* from
this soft
ware witho
ut prior w
ritten per
mission. F
or written
|
| 35 |
|
* perm
ission, pl
ease conta
ct apache@
apache.org
.
|
|
35 |
|
* perm
ission, pl
ease conta
ct apache@
apache.org
.
|
| 36 |
|
*
|
|
36 |
|
*
|
| 37 |
|
* 5. Prod
ucts deriv
ed from th
is softwar
e may not
be called
"Apache"
|
|
37 |
|
* 5. Prod
ucts deriv
ed from th
is softwar
e may not
be called
"Apache"
|
| 38 |
|
* nor
may "Apach
e" appear
in their n
ames witho
ut prior w
ritten
|
|
38 |
|
* nor
may "Apach
e" appear
in their n
ames witho
ut prior w
ritten
|
| 39 |
|
* perm
ission of
the Apache
Group.
|
|
39 |
|
* perm
ission of
the Apache
Group.
|
| 40 |
|
*
|
|
40 |
|
*
|
| 41 |
|
* THIS SO
FTWARE IS
PROVIDED `
`AS IS'' A
ND ANY EXP
RESSED OR
IMPLIED
|
|
41 |
|
* THIS SO
FTWARE IS
PROVIDED `
`AS IS'' A
ND ANY EXP
RESSED OR
IMPLIED
|
| 42 |
|
* WARRANT
IES, INCLU
DING, BUT
NOT LIMITE
D TO, THE
IMPLIED WA
RRANTIES
|
|
42 |
|
* WARRANT
IES, INCLU
DING, BUT
NOT LIMITE
D TO, THE
IMPLIED WA
RRANTIES
|
| 43 |
|
* OF MERC
HANTABILIT
Y AND FITN
ESS FOR A
PARTICULAR
PURPOSE A
RE
|
|
43 |
|
* OF MERC
HANTABILIT
Y AND FITN
ESS FOR A
PARTICULAR
PURPOSE A
RE
|
| 44 |
|
* DISCLAI
MED. IN N
O EVENT SH
ALL THE AP
ACHE SOFTW
ARE FOUNDA
TION OR
|
|
44 |
|
* DISCLAI
MED. IN N
O EVENT SH
ALL THE AP
ACHE SOFTW
ARE FOUNDA
TION OR
|
| 45 |
|
* ITS CON
TRIBUTORS
BE LIABLE
FOR ANY DI
RECT, INDI
RECT, INCI
DENTAL,
|
|
45 |
|
* ITS CON
TRIBUTORS
BE LIABLE
FOR ANY DI
RECT, INDI
RECT, INCI
DENTAL,
|
| 46 |
|
* SPECIAL
, EXEMPLAR
Y, OR CONS
EQUENTIAL
DAMAGES (I
NCLUDING,
BUT NOT
|
|
46 |
|
* SPECIAL
, EXEMPLAR
Y, OR CONS
EQUENTIAL
DAMAGES (I
NCLUDING,
BUT NOT
|
| 47 |
|
* LIMITED
TO, PROCU
REMENT OF
SUBSTITUTE
GOODS OR
SERVICES;
LOSS OF
|
|
47 |
|
* LIMITED
TO, PROCU
REMENT OF
SUBSTITUTE
GOODS OR
SERVICES;
LOSS OF
|
| 48 |
|
* USE, DA
TA, OR PRO
FITS; OR B
USINESS IN
TERRUPTION
) HOWEVER
CAUSED AND
|
|
48 |
|
* USE, DA
TA, OR PRO
FITS; OR B
USINESS IN
TERRUPTION
) HOWEVER
CAUSED AND
|
| 49 |
|
* ON ANY
THEORY OF
LIABILITY,
WHETHER I
N CONTRACT
, STRICT L
IABILITY,
|
|
49 |
|
* ON ANY
THEORY OF
LIABILITY,
WHETHER I
N CONTRACT
, STRICT L
IABILITY,
|
| 50 |
|
* OR TORT
(INCLUDIN
G NEGLIGEN
CE OR OTHE
RWISE) ARI
SING IN AN
Y WAY OUT
|
|
50 |
|
* OR TORT
(INCLUDIN
G NEGLIGEN
CE OR OTHE
RWISE) ARI
SING IN AN
Y WAY OUT
|
| 51 |
|
* OF THE
USE OF THI
S SOFTWARE
, EVEN IF
ADVISED OF
THE POSSI
BILITY OF
|
|
51 |
|
* OF THE
USE OF THI
S SOFTWARE
, EVEN IF
ADVISED OF
THE POSSI
BILITY OF
|
| 52 |
|
* SUCH DA
MAGE.
|
|
52 |
|
* SUCH DA
MAGE.
|
| 53 |
|
* =======
==========
==========
==========
==========
==========
==========
=
|
|
53 |
|
* =======
==========
==========
==========
==========
==========
==========
=
|
| 54 |
|
*
|
|
54 |
|
*
|
| 55 |
|
* This so
ftware con
sists of v
oluntary c
ontributio
ns made by
many
|
|
55 |
|
* This so
ftware con
sists of v
oluntary c
ontributio
ns made by
many
|
| 56 |
|
* individ
uals on be
half of th
e Apache S
oftware Fo
undation.
For more
|
|
56 |
|
* individ
uals on be
half of th
e Apache S
oftware Fo
undation.
For more
|
| 57 |
|
* informa
tion on th
e Apache S
oftware Fo
undation,
please see
|
|
57 |
|
* informa
tion on th
e Apache S
oftware Fo
undation,
please see
|
| 58 |
|
* <http:/
/www.apach
e.org/>.
|
|
58 |
|
* <http:/
/www.apach
e.org/>.
|
| 59 |
|
*
|
|
59 |
|
*
|
| 60 |
|
* [Additi
onal notic
es, if req
uired by p
rior licen
sing condi
tions]
|
|
60 |
|
* [Additi
onal notic
es, if req
uired by p
rior licen
sing condi
tions]
|
| 61 |
|
*
|
|
61 |
|
*
|
| 62 |
|
*/
|
|
62 |
|
*/
|
| 63 |
|
|
|
63 |
|
|
| 64 |
|
|
|
64 |
|
|
| 65 |
|
package or
g.apache.c
atalina.co
nnector.ht
tp10;
|
|
65 |
|
package or
g.apache.c
atalina.co
nnector.ht
tp10;
|
| 66 |
|
|
|
66 |
|
|
| 67 |
|
|
|
67 |
|
|
| 68 |
|
import jav
a.io.IOExc
eption;
|
|
68 |
|
import jav
a.io.IOExc
eption;
|
| 69 |
|
import jav
a.net.Inet
Address;
|
|
69 |
|
import jav
a.net.Inet
Address;
|
| 70 |
|
import jav
a.net.Serv
erSocket;
|
|
70 |
|
import jav
a.net.Serv
erSocket;
|
| 71 |
|
import jav
a.net.Sock
et;
|
|
71 |
|
import jav
a.net.Sock
et;
|
| 72 |
|
import jav
a.security
.AccessCon
trolExcept
ion;
|
|
72 |
|
import jav
a.security
.AccessCon
trolExcept
ion;
|
| 73 |
|
import jav
a.util.Sta
ck;
|
|
73 |
|
import jav
a.util.Sta
ck;
|
| 74 |
|
import jav
a.util.Vec
tor;
|
|
74 |
|
import jav
a.util.Vec
tor;
|
| |
|
75 |
|
import jav
a.security
.KeyStoreE
xception;
|
| |
|
76 |
|
import jav
a.security
.NoSuchAlg
orithmExce
ption;
|
| |
|
77 |
|
import jav
a.security
.cert.Cert
ificateExc
eption;
|
| |
|
78 |
|
import jav
a.security
.Unrecover
ableKeyExc
eption;
|
| |
|
79 |
|
import jav
a.security
.KeyManage
mentExcept
ion;
|
| 75 |
|
import org
.apache.ca
talina.Con
nector;
|
|
80 |
|
import org
.apache.ca
talina.Con
nector;
|
| 76 |
|
import org
.apache.ca
talina.Con
tainer;
|
|
81 |
|
import org
.apache.ca
talina.Con
tainer;
|
| 77 |
|
import org
.apache.ca
talina.Htt
pRequest;
|
|
82 |
|
import org
.apache.ca
talina.Htt
pRequest;
|
| 78 |
|
import org
.apache.ca
talina.Htt
pResponse;
|
|
83 |
|
import org
.apache.ca
talina.Htt
pResponse;
|
| 79 |
|
import org
.apache.ca
talina.Lif
ecycle;
|
|
84 |
|
import org
.apache.ca
talina.Lif
ecycle;
|
| 80 |
|
import org
.apache.ca
talina.Lif
ecycleEven
t;
|
|
85 |
|
import org
.apache.ca
talina.Lif
ecycleEven
t;
|
| 81 |
|
import org
.apache.ca
talina.Lif
ecycleExce
ption;
|
|
86 |
|
import org
.apache.ca
talina.Lif
ecycleExce
ption;
|
| 82 |
|
import org
.apache.ca
talina.Lif
ecycleList
ener;
|
|
87 |
|
import org
.apache.ca
talina.Lif
ecycleList
ener;
|
| 83 |
|
import org
.apache.ca
talina.Log
ger;
|
|
88 |
|
import org
.apache.ca
talina.Log
ger;
|
| 84 |
|
import org
.apache.ca
talina.Req
uest;
|
|
89 |
|
import org
.apache.ca
talina.Req
uest;
|
| 85 |
|
import org
.apache.ca
talina.Res
ponse;
|
|
90 |
|
import org
.apache.ca
talina.Res
ponse;
|
| 86 |
|
import org
.apache.ca
talina.Ser
vice;
|
|
91 |
|
import org
.apache.ca
talina.Ser
vice;
|
| 87 |
|
import org
.apache.ca
talina.net
.DefaultSe
rverSocket
Factory;
|
|
92 |
|
import org
.apache.ca
talina.net
.DefaultSe
rverSocket
Factory;
|
| 88 |
|
import org
.apache.ca
talina.net
.ServerSoc
ketFactory
;
|
|
93 |
|
import org
.apache.ca
talina.net
.ServerSoc
ketFactory
;
|
| 89 |
|
import org
.apache.ca
talina.uti
l.Lifecycl
eSupport;
|
|
94 |
|
import org
.apache.ca
talina.uti
l.Lifecycl
eSupport;
|
| 90 |
|
import org
.apache.ca
talina.uti
l.StringMa
nager;
|
|
95 |
|
import org
.apache.ca
talina.uti
l.StringMa
nager;
|
| 91 |
|
|
|
96 |
|
|
| 92 |
|
|
|
97 |
|
|
| 93 |
|
/**
|
|
98 |
|
/**
|
| 94 |
|
* Simple
implementa
tion of an
HTTP/1.0
Connector,
for testi
ng and deb
ugging
|
|
99 |
|
* Simple
implementa
tion of an
HTTP/1.0
Connector,
for testi
ng and deb
ugging
|
| 95 |
|
* purpose
s. Not in
tended to
be the fin
al solutio
n.
|
|
100 |
|
* purpose
s. Not in
tended to
be the fin
al solutio
n.
|
| 96 |
|
*
|
|
101 |
|
*
|
| 97 |
|
* @author
Craig R.
McClanahan
|
|
102 |
|
* @author
Craig R.
McClanahan
|
| 98 |
|
*
@version
$Revision:
1.1
2
$
$Date:
200
1
/0
9
/1
1
1
7:
33
:
0
2
$
|
|
103 |
|
*
@version
$Revision:
1.1
7
$
$Date:
200
2
/0
3
/1
8
0
7:
15
:
4
0
$
|
| |
|
104 |
|
* @deprec
ated
|
| 99 |
|
*/
|
|
105 |
|
*/
|
| 100 |
|
|
|
106 |
|
|
| 101 |
|
|
|
107 |
|
|
| 102 |
|
public fin
al class H
ttpConnect
or
|
|
108 |
|
public fin
al class H
ttpConnect
or
|
| 103 |
|
implem
ents Conne
ctor, Life
cycle, Run
nable {
|
|
109 |
|
implem
ents Conne
ctor, Life
cycle, Run
nable {
|
| 104 |
|
|
|
110 |
|
|
| 105 |
|
|
|
111 |
|
|
| 106 |
|
// ---
----------
----------
----------
----------
----------
Instance
Variables
|
|
112 |
|
// ---
----------
----------
----------
----------
----------
Instance
Variables
|
| 107 |
|
|
|
113 |
|
|
| 108 |
|
|
|
114 |
|
|
| 109 |
|
/**
|
|
115 |
|
/**
|
| 110 |
|
* The
accept co
unt for th
is Connect
or.
|
|
116 |
|
* The
accept co
unt for th
is Connect
or.
|
| 111 |
|
*/
|
|
117 |
|
*/
|
| 112 |
|
privat
e int acce
ptCount =
10;
|
|
118 |
|
privat
e int acce
ptCount =
10;
|
| 113 |
|
|
|
119 |
|
|
| 114 |
|
|
|
120 |
|
|
| 115 |
|
/**
|
|
121 |
|
/**
|
| 116 |
|
* The
IP addres
s on which
to bind,
if any. I
f <code>nu
ll</code>,
all
|
|
122 |
|
* The
IP addres
s on which
to bind,
if any. I
f <code>nu
ll</code>,
all
|
| 117 |
|
* add
resses on
the server
will be b
ound.
|
|
123 |
|
* add
resses on
the server
will be b
ound.
|
| 118 |
|
*/
|
|
124 |
|
*/
|
| 119 |
|
privat
e String a
ddress = n
ull;
|
|
125 |
|
privat
e String a
ddress = n
ull;
|
| 120 |
|
|
|
126 |
|
|
| 121 |
|
|
|
127 |
|
|
| 122 |
|
/**
|
|
128 |
|
/**
|
| 123 |
|
* The
input buf
fer size w
e should c
reate on i
nput strea
ms.
|
|
129 |
|
* The
input buf
fer size w
e should c
reate on i
nput strea
ms.
|
| 124 |
|
*/
|
|
130 |
|
*/
|
| 125 |
|
privat
e int buff
erSize = 2
048;
|
|
131 |
|
privat
e int buff
erSize = 2
048;
|
| 126 |
|
|
|
132 |
|
|
| 127 |
|
|
|
133 |
|
|
| 128 |
|
/**
|
|
134 |
|
/**
|
| 129 |
|
* The
Container
used for
processing
requests
received b
y this Con
nector.
|
|
135 |
|
* The
Container
used for
processing
requests
received b
y this Con
nector.
|
| 130 |
|
*/
|
|
136 |
|
*/
|
| 131 |
|
protec
ted Contai
ner contai
ner = null
;
|
|
137 |
|
protec
ted Contai
ner contai
ner = null
;
|
| 132 |
|
|
|
138 |
|
|
| 133 |
|
|
|
139 |
|
|
| 134 |
|
/**
|
|
140 |
|
/**
|
| 135 |
|
* The
set of pr
ocessors t
hat have e
ver been c
reated.
|
|
141 |
|
* The
set of pr
ocessors t
hat have e
ver been c
reated.
|
| 136 |
|
*/
|
|
142 |
|
*/
|
| 137 |
|
privat
e Vector c
reated = n
ew Vector(
);
|
|
143 |
|
privat
e Vector c
reated = n
ew Vector(
);
|
| 138 |
|
|
|
144 |
|
|
| 139 |
|
|
|
145 |
|
|
| 140 |
|
/**
|
|
146 |
|
/**
|
| 141 |
|
* The
current n
umber of p
rocessors
that have
been creat
ed.
|
|
147 |
|
* The
current n
umber of p
rocessors
that have
been creat
ed.
|
| 142 |
|
*/
|
|
148 |
|
*/
|
| 143 |
|
privat
e int curP
rocessors
= 0;
|
|
149 |
|
privat
e int curP
rocessors
= 0;
|
| 144 |
|
|
|
150 |
|
|
| 145 |
|
|
|
151 |
|
|
| 146 |
|
/**
|
|
152 |
|
/**
|
| (666 unchanged lines omitted) |
| 813 |
|
/**
|
|
819 |
|
/**
|
| 814 |
|
* Log
a message
on the Lo
gger assoc
iated with
our Conta
iner (if a
ny).
|
|
820 |
|
* Log
a message
on the Lo
gger assoc
iated with
our Conta
iner (if a
ny).
|
| 815 |
|
*
|
|
821 |
|
*
|
| 816 |
|
* @pa
ram messag
e Message
to be logg
ed
|
|
822 |
|
* @pa
ram messag
e Message
to be logg
ed
|
| 817 |
|
* @pa
ram throwa
ble Associ
ated excep
tion
|
|
823 |
|
* @pa
ram throwa
ble Associ
ated excep
tion
|
| 818 |
|
*/
|
|
824 |
|
*/
|
| 819 |
|
privat
e void log
(String me
ssage, Thr
owable thr
owable) {
|
|
825 |
|
privat
e void log
(String me
ssage, Thr
owable thr
owable) {
|
| 820 |
|
|
|
826 |
|
|
| 821 |
|
Lo
gger logge
r = contai
ner.getLog
ger();
|
|
827 |
|
Lo
gger logge
r = contai
ner.getLog
ger();
|
| 822 |
|
St
ring local
Name = thr
eadName;
|
|
828 |
|
St
ring local
Name = thr
eadName;
|
| 823 |
|
if
(localNam
e == null)
|
|
829 |
|
if
(localNam
e == null)
|
| 824 |
|
localNam
e = "HttpC
onnector";
|
|
830 |
|
localNam
e = "HttpC
onnector";
|
| 825 |
|
if
(logger !
= null)
|
|
831 |
|
if
(logger !
= null)
|
| 826 |
|
logger.l
og(localNa
me + " " +
message,
throwable)
;
|
|
832 |
|
logger.l
og(localNa
me + " " +
message,
throwable)
;
|
| 827 |
|
el
se {
|
|
833 |
|
el
se {
|
| 828 |
|
System.o
ut.println
(localName
+ " " + m
essage);
|
|
834 |
|
System.o
ut.println
(localName
+ " " + m
essage);
|
| 829 |
|
throwabl
e.printSta
ckTrace(Sy
stem.out);
|
|
835 |
|
throwabl
e.printSta
ckTrace(Sy
stem.out);
|
| 830 |
|
}
|
|
836 |
|
}
|
| 831 |
|
|
|
837 |
|
|
| 832 |
|
}
|
|
838 |
|
}
|
| 833 |
|
|
|
839 |
|
|
| 834 |
|
|
|
840 |
|
|
| 835 |
|
/**
|
|
841 |
|
/**
|
| 836 |
|
* Cre
ate and re
turn a new
processor
suitable
for proces
sing HTTP
|
|
842 |
|
* Cre
ate and re
turn a new
processor
suitable
for proces
sing HTTP
|
| 837 |
|
* req
uests and
returning
the corres
ponding re
sponses.
|
|
843 |
|
* req
uests and
returning
the corres
ponding re
sponses.
|
| 838 |
|
*/
|
|
844 |
|
*/
|
| 839 |
|
privat
e HttpProc
essor newP
rocessor()
{
|
|
845 |
|
privat
e HttpProc
essor newP
rocessor()
{
|
| 840 |
|
|
|
846 |
|
|
| 841 |
|
Ht
tpProcesso
r processo
r = new Ht
tpProcesso
r(this, cu
rProcessor
s++);
|
|
847 |
|
Ht
tpProcesso
r processo
r = new Ht
tpProcesso
r(this, cu
rProcessor
s++);
|
| 842 |
|
if
(processo
r instance
of Lifecyc
le) {
|
|
848 |
|
if
(processo
r instance
of Lifecyc
le) {
|
| 843 |
|
try {
|
|
849 |
|
try {
|
| 844 |
|
((Li
fecycle) p
rocessor).
start();
|
|
850 |
|
((Li
fecycle) p
rocessor).
start();
|
| 845 |
|
} catch
(Lifecycle
Exception
e) {
|
|
851 |
|
} catch
(Lifecycle
Exception
e) {
|
| 846 |
|
log(
"newProces
sor", e);
|
|
852 |
|
log(
"newProces
sor", e);
|
| 847 |
|
retu
rn (null);
|
|
853 |
|
retu
rn (null);
|
| 848 |
|
}
|
|
854 |
|
}
|
| 849 |
|
}
|
|
855 |
|
}
|
| 850 |
|
cr
eated.addE
lement(pro
cessor);
|
|
856 |
|
cr
eated.addE
lement(pro
cessor);
|
| 851 |
|
re
turn (proc
essor);
|
|
857 |
|
re
turn (proc
essor);
|
| 852 |
|
|
|
858 |
|
|
| 853 |
|
}
|
|
859 |
|
}
|
| 854 |
|
|
|
860 |
|
|
| 855 |
|
|
|
861 |
|
|
| 856 |
|
/**
|
|
862 |
|
/**
|
| 857 |
|
* Ope
n and retu
rn the ser
ver socket
for this
Connector.
If an IP
|
|
863 |
|
* Ope
n and retu
rn the ser
ver socket
for this
Connector.
If an IP
|
| 858 |
|
* add
ress has b
een specif
ied, the s
ocket will
be opened
only on t
hat
|
|
864 |
|
* add
ress has b
een specif
ied, the s
ocket will
be opened
only on t
hat
|
| 859 |
|
* add
ress; othe
rwise it w
ill be ope
ned on all
addresses
.
|
|
865 |
|
* add
ress; othe
rwise it w
ill be ope
ned on all
addresses
.
|
| 860 |
|
*
|
|
866 |
|
*
|
| 861 |
|
*
@exception
IOExceptio
n
i
f
an
i
nput/outpu
t
e
r
r
o
r
o
ccu
r
s
|
|
867 |
|
*
@exception
IOExceptio
n
i
nput/outpu
t
or
n
e
two
r
k
e
r
ro
r
|
| |
|
868 |
|
* @ex
ception Ke
yStoreExce
ption
error
instantia
ting the
|
| |
|
869 |
|
*
KeySt
ore from f
ile (SSL o
nly)
|
| |
|
870 |
|
* @ex
ception No
SuchAlgori
thmExcepti
on KeySt
ore algori
thm unsupp
orted
|
| |
|
871 |
|
*
by cu
rrent prov
ider (SSL
only)
|
| |
|
872 |
|
* @ex
ception Ce
rtificateE
xception
gener
al certifi
cate error
(SSL only
)
|
| |
|
873 |
|
* @ex
ception Un
recoverabl
eKeyExcept
ion inter
nal KeySto
re problem
with
|
| |
|
874 |
|
*
the c
ertificate
(SSL only
)
|
| |
|
875 |
|
* @ex
ception Ke
yManagemen
tException
probl
em in the
key manage
ment
|
| |
|
876 |
|
*
layer
(SSL only
)
|
| 862 |
|
*/
|
|
877 |
|
*/
|
| 863 |
|
private
ServerSock
et
open()
throws
IOExceptio
n
{
|
|
878 |
|
private
ServerSock
et
open()
|
| |
|
879 |
|
throws
IOExcepti
on, KeySto
reExceptio
n, NoSuchA
lgorithmEx
ception,
|
| |
|
880 |
|
Certifica
teExceptio
n, Unrecov
erableKeyE
xception,
|
| |
|
881 |
|
|