File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
src/main/java/org/jruby/rack Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 77
88package org .jruby .rack ;
99
10+ import org .jruby .rack .ext .Input ;
11+
1012import java .io .IOException ;
1113import java .io .InputStream ;
1214import java .util .Enumeration ;
@@ -157,4 +159,36 @@ public interface RackEnvironment {
157159 * @return the remote user
158160 */
159161 String getRemoteUser ();
162+
163+ /**
164+ * {@link RackEnvironment} extension to obtain a rack.input IO.
165+ * <p>
166+ * NOTE: This interface will most likely get moved onto the (parent)
167+ * environment interface directly once the deprecated way of maintaining
168+ * backwards compatibility (using jruby/rack/environment.rb) is removed.
169+ *
170+ * @deprecated Was an internal interface and is no longer used.
171+ * @author kares
172+ */
173+ @ Deprecated
174+ interface ToIO {
175+
176+ // TODO move to RackEnvironment once jruby/rack/environment.rb removed
177+
178+ /**
179+ * Convert this environment into a "rack.input" IO.
180+ * Replaces the <code>to_io</code> monkey-patch ...
181+ * @return rack.input
182+ */
183+ public Input toIO ();
184+
185+ /**
186+ * Set the rack.input, this is an optional operation and implementers
187+ * might ignore this call silently if they're capable of constructing
188+ * the rack.input themselves.
189+ * @param io the rack.input instance
190+ */
191+ void setIO (Input io ) ;
192+
193+ }
160194}
You can’t perform that action at this time.
0 commit comments