
org.jruby.rack.embed.Servlet 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.embed;
import javax.servlet.ServletConfig;
import org.jruby.rack.AbstractServlet;
import org.jruby.rack.RackContext;
import org.jruby.rack.RackDispatcher;
public class Servlet extends AbstractServlet {
private final Dispatcher dispatcher;
private final Context context;
public Servlet(Dispatcher dispatcher, Context context) {
this.dispatcher = dispatcher;
this.context = context;
}
@Override
protected RackContext getContext() {
return this.context;
}
@Override
protected RackDispatcher getDispatcher() {
return this.dispatcher;
}
@Override
public void init(ServletConfig config) {
// NOOP
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy