annotate src/org/eclipse/jetty/io/ByteArrayEndPoint.java @ 928:23a57aad34c0

remove isAsync()
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 09 Oct 2016 18:54:32 -0600
parents c60c1adfac3e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 // ========================================================================
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 // Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 // ------------------------------------------------------------------------
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 // All rights reserved. This program and the accompanying materials
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 // are made available under the terms of the Eclipse Public License v1.0
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 // and Apache License v2.0 which accompanies this distribution.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 // The Eclipse Public License is available at
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 // http://www.eclipse.org/legal/epl-v10.html
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 // The Apache License v2.0 is available at
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 // http://www.opensource.org/licenses/apache2.0.php
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 // You may elect to redistribute this code under either of these licenses.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 // ========================================================================
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 package org.eclipse.jetty.io;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 import java.io.IOException;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 /* ------------------------------------------------------------ */
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 /** ByteArrayEndPoint.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 *
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28 *
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 */
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30 public class ByteArrayEndPoint implements ConnectedEndPoint
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31 {
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
32 protected byte[] _inBytes;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
33 protected ByteArrayBuffer _in;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
34 protected ByteArrayBuffer _out;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
35 protected boolean _closed;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
36 protected boolean _nonBlocking;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
37 protected boolean _growOutput;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
38 protected Connection _connection;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
39 protected int _maxIdleTime;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
41
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
42 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
43 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
44 *
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
45 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
46 public ByteArrayEndPoint()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
47 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
48 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
49
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
50 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
51 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
52 * @see org.eclipse.jetty.io.ConnectedEndPoint#getConnection()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
53 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
54 public Connection getConnection()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
55 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
56 return _connection;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
57 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
58
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
59 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
60 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
61 * @see org.eclipse.jetty.io.ConnectedEndPoint#setConnection(org.eclipse.jetty.io.Connection)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
62 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
63 public void setConnection(Connection connection)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
64 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
65 _connection=connection;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
66 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
67
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
68 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
69 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
70 * @return the nonBlocking
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
71 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
72 public boolean isNonBlocking()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
73 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
74 return _nonBlocking;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
75 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
76
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
77 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
78 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
79 * @param nonBlocking the nonBlocking to set
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
80 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
81 public void setNonBlocking(boolean nonBlocking)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
82 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
83 _nonBlocking=nonBlocking;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
84 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
85
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
86 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
87 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
88 *
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
89 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
90 public ByteArrayEndPoint(byte[] input, int outputSize)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
91 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
92 _inBytes=input;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
93 _in=new ByteArrayBuffer(input);
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
94 _out=new ByteArrayBuffer(outputSize);
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
95 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
96
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
97 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
98 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
99 * @return Returns the in.
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
100 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
101 public ByteArrayBuffer getIn()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
102 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
103 return _in;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
104 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
105 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
106 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
107 * @param in The in to set.
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
108 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
109 public void setIn(ByteArrayBuffer in)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
110 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
111 _in = in;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
112 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
113 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
114 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
115 * @return Returns the out.
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
116 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
117 public ByteArrayBuffer getOut()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
118 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
119 return _out;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
120 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
121 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
122 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
123 * @param out The out to set.
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
124 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
125 public void setOut(ByteArrayBuffer out)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
126 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
127 _out = out;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
128 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
129
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
130 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
131 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
132 * @see org.eclipse.io.EndPoint#isOpen()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
133 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
134 public boolean isOpen()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
135 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
136 return !_closed;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
137 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
138
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
139 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
140 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
141 * @see org.eclipse.jetty.io.EndPoint#isInputShutdown()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
142 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
143 public boolean isInputShutdown()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
144 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
145 return _closed;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
146 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
147
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
148 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
149 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
150 * @see org.eclipse.jetty.io.EndPoint#isOutputShutdown()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
151 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
152 public boolean isOutputShutdown()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
153 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
154 return _closed;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
155 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
156
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
157 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
158 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
159 * @see org.eclipse.io.EndPoint#isBlocking()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
160 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
161 public boolean isBlocking()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
162 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
163 return !_nonBlocking;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
164 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
165
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
166 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
167 public boolean blockReadable(long millisecs)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
168 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
169 return true;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
170 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
171
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
172 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
173 public boolean blockWritable(long millisecs)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
174 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
175 return true;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
176 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
177
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
178 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
179 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
180 * @see org.eclipse.io.EndPoint#shutdownOutput()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
181 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
182 public void shutdownOutput() throws IOException
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
183 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
184 close();
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
185 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
186
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
187 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
188 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
189 * @see org.eclipse.io.EndPoint#shutdownInput()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
190 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
191 public void shutdownInput() throws IOException
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
192 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
193 close();
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
194 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
195
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
196 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
197 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
198 * @see org.eclipse.io.EndPoint#close()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
199 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
200 public void close() throws IOException
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
201 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
202 _closed=true;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
203 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
204
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
205 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
206 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
207 * @see org.eclipse.io.EndPoint#fill(org.eclipse.io.Buffer)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
208 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
209 public int fill(Buffer buffer) throws IOException
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
210 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
211 if (_closed)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
212 throw new IOException("CLOSED");
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
213
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
214 if (_in!=null && _in.length()>0)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
215 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
216 int len = buffer.put(_in);
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
217 _in.skip(len);
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
218 return len;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
219 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
220
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
221 if (_in!=null && _in.length()==0 && _nonBlocking)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
222 return 0;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
223
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
224 close();
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
225 return -1;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
226 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
227
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
228 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
229 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
230 * @see org.eclipse.io.EndPoint#flush(org.eclipse.io.Buffer)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
231 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
232 public int flush(Buffer buffer) throws IOException
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
233 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
234 if (_closed)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
235 throw new IOException("CLOSED");
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
236 if (_growOutput && buffer.length()>_out.space())
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
237 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
238 _out.compact();
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
239
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
240 if (buffer.length()>_out.space())
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
241 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
242 ByteArrayBuffer n = new ByteArrayBuffer(_out.putIndex()+buffer.length());
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
243
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
244 n.put(_out.peek(0,_out.putIndex()));
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
245 if (_out.getIndex()>0)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
246 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
247 n.mark();
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
248 n.setGetIndex(_out.getIndex());
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
249 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
250 _out=n;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
251 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
252 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
253 int len = _out.put(buffer);
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
254 if (!buffer.isImmutable())
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
255 buffer.skip(len);
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
256 return len;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
257 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
258
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
259 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
260 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
261 * @see org.eclipse.io.EndPoint#flush(org.eclipse.io.Buffer, org.eclipse.io.Buffer, org.eclipse.io.Buffer)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
262 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
263 public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
264 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
265 if (_closed)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
266 throw new IOException("CLOSED");
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
267
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
268 int flushed=0;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
269
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
270 if (header!=null && header.length()>0)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
271 flushed=flush(header);
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
272
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
273 if (header==null || header.length()==0)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
274 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
275 if (buffer!=null && buffer.length()>0)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
276 flushed+=flush(buffer);
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
277
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
278 if (buffer==null || buffer.length()==0)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
279 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
280 if (trailer!=null && trailer.length()>0)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
281 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
282 flushed+=flush(trailer);
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
283 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
284 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
285 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
286
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
287 return flushed;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
288 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
289
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
290 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
291 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
292 *
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
293 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
294 public void reset()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
295 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
296 _closed=false;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
297 _in.clear();
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
298 _out.clear();
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
299 if (_inBytes!=null)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
300 _in.setPutIndex(_inBytes.length);
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
301 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
302
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
303 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
304 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
305 * @see org.eclipse.io.EndPoint#getLocalAddr()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
306 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
307 public String getLocalAddr()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
308 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
309 return null;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
310 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
311
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
312 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
313 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
314 * @see org.eclipse.io.EndPoint#getLocalHost()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
315 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
316 public String getLocalHost()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
317 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
318 return null;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
319 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
320
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
321 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
322 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
323 * @see org.eclipse.io.EndPoint#getLocalPort()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
324 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
325 public int getLocalPort()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
326 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
327 return 0;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
328 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
329
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
330 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
331 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
332 * @see org.eclipse.io.EndPoint#getRemoteAddr()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
333 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
334 public String getRemoteAddr()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
335 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
336 return null;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
337 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
338
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
339 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
340 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
341 * @see org.eclipse.io.EndPoint#getRemoteHost()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
342 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
343 public String getRemoteHost()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
344 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
345 return null;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
346 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
347
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
348 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
349 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
350 * @see org.eclipse.io.EndPoint#getRemotePort()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
351 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
352 public int getRemotePort()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
353 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
354 return 0;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
355 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
356
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
357 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
358 /*
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
359 * @see org.eclipse.io.EndPoint#getConnection()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
360 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
361 public Object getTransport()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
362 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
363 return _inBytes;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
364 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
365
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
366 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
367 public void flush() throws IOException
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
368 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
369 }
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
370
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
371 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
372 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
373 * @return the growOutput
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
374 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
375 public boolean isGrowOutput()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
376 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
377 return _growOutput;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
378 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
379
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
380 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
381 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
382 * @param growOutput the growOutput to set
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
383 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
384 public void setGrowOutput(boolean growOutput)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
385 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
386 _growOutput=growOutput;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
387 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
388
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
389 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
390 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
391 * @see org.eclipse.jetty.io.EndPoint#getMaxIdleTime()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
392 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
393 public int getMaxIdleTime()
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
394 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
395 return _maxIdleTime;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
396 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
397
909
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
398 /* ------------------------------------------------------------ */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
399 /**
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
400 * @see org.eclipse.jetty.io.EndPoint#setMaxIdleTime(int)
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
401 */
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
402 public void setMaxIdleTime(int timeMs) throws IOException
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
403 {
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
404 _maxIdleTime=timeMs;
c60c1adfac3e simplify connectors
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
405 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
406
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
407
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
408 }