Created
August 28, 2012 20:32
-
-
Save pmahoney/3503878 to your computer and use it in GitHub Desktop.
Ruby Servlet impl skeleton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Implements some part of the Servlet API in Ruby. Does not extend | |
# javax.servlet.http.HttpServlet, but implements javax.servlet.Servlet | |
class MyServlet | |
include Java::JavaxServlet::Servlet | |
# @param [javax.servlet.ServletConfig] servletConfig | |
def init(servletConfig) | |
end | |
def destroy | |
# no-op | |
end | |
def to_s | |
"#<#{self.class}>" | |
end | |
alias :servlet_info :to_s | |
# @param [javax.servlet.ServletRequest] req a Java servlet request | |
# | |
# @param [javax.servlet.ServletResponse] resp a Java servlet response | |
def service(req, resp) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment