org.jruby.rack.RackResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jruby-rack Show documentation
Show all versions of jruby-rack Show documentation
A servlet bridge for (Ruby-based) Rack applications that allow them
to run in Java Application servers using JRuby.
/*
* Copyright (c) 2010-2012 Engine Yard, Inc.
* Copyright (c) 2007-2009 Sun Microsystems, Inc.
* This source code is available under the MIT license.
* See the file LICENSE.txt for details.
*/
package org.jruby.rack;
import java.util.Map;
/**
* Represents a Rack response for the Java world.
*
* Rack response is an array of exactly three values: status, headers, and body.
*
* @author nicksieger
*/
public interface RackResponse {
/**
* @return the response (HTTP) status
*/
int getStatus();
/**
* @return the response headers
*/
Map getHeaders();
/**
* @return the response body
*/
String getBody();
/**
* Writes the response (status, headers, and body) to the response environment.
* @param response the (servlet) response environment
*/
void respond(RackResponseEnvironment response);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy