관리-도구
편집 파일: Handler.html
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Module: Rack::Handler</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ function popupCode( url ) { window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") } function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make codeblocks hidden by default document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) // ]]> </script> </head> <body> <div id="classHeader"> <table class="header-table"> <tr class="top-aligned-row"> <td><strong>Module</strong></td> <td class="class-name-in-header">Rack::Handler</td> </tr> <tr class="top-aligned-row"> <td><strong>In:</strong></td> <td> <a href="../../files/lib/rack/handler_rb.html"> lib/rack/handler.rb </a> <br /> <a href="../../files/lib/rack/handler/lsws_rb.html"> lib/rack/handler/lsws.rb </a> <br /> <a href="../../files/lib/rack/handler/swiftiplied_mongrel_rb.html"> lib/rack/handler/swiftiplied_mongrel.rb </a> <br /> <a href="../../files/lib/rack/handler/evented_mongrel_rb.html"> lib/rack/handler/evented_mongrel.rb </a> <br /> <a href="../../files/lib/rack/handler/webrick_rb.html"> lib/rack/handler/webrick.rb </a> <br /> <a href="../../files/lib/rack/handler/thin_rb.html"> lib/rack/handler/thin.rb </a> <br /> <a href="../../files/lib/rack/handler/scgi_rb.html"> lib/rack/handler/scgi.rb </a> <br /> <a href="../../files/lib/rack/handler/mongrel_rb.html"> lib/rack/handler/mongrel.rb </a> <br /> <a href="../../files/lib/rack/handler/cgi_rb.html"> lib/rack/handler/cgi.rb </a> <br /> <a href="../../files/lib/rack/handler/fastcgi_rb.html"> lib/rack/handler/fastcgi.rb </a> <br /> </td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="description"> <p> <b>Handlers</b> connect web servers with <a href="../Rack.html">Rack</a>. </p> <p> <a href="../Rack.html">Rack</a> includes Handlers for <a href="Handler/Thin.html">Thin</a>, <a href="Handler/WEBrick.html">WEBrick</a>, <a href="Handler/FastCGI.html">FastCGI</a>, <a href="Handler/CGI.html">CGI</a>, <a href="Handler/SCGI.html">SCGI</a> and LiteSpeed. </p> <p> Handlers usually are activated by calling <tt>MyHandler.run(myapp)</tt>. A second optional hash can be passed to include server-specific configuration. </p> </div> </div> <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> <a href="#M000068">default</a> <a href="#M000066">get</a> <a href="#M000067">pick</a> <a href="#M000070">register</a> <a href="#M000069">try_require</a> </div> </div> </div> <!-- if includes --> <div id="section"> <div id="class-list"> <h3 class="section-bar">Classes and Modules</h3> Class <a href="Handler/CGI.html" class="link">Rack::Handler::CGI</a><br /> Class <a href="Handler/EventedMongrel.html" class="link">Rack::Handler::EventedMongrel</a><br /> Class <a href="Handler/FastCGI.html" class="link">Rack::Handler::FastCGI</a><br /> Class <a href="Handler/LSWS.html" class="link">Rack::Handler::LSWS</a><br /> Class <a href="Handler/Mongrel.html" class="link">Rack::Handler::Mongrel</a><br /> Class <a href="Handler/SCGI.html" class="link">Rack::Handler::SCGI</a><br /> Class <a href="Handler/SwiftipliedMongrel.html" class="link">Rack::Handler::SwiftipliedMongrel</a><br /> Class <a href="Handler/Thin.html" class="link">Rack::Handler::Thin</a><br /> Class <a href="Handler/WEBrick.html" class="link">Rack::Handler::WEBrick</a><br /> </div> <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Class methods</h3> <div id="method-M000068" class="method-detail"> <a name="M000068"></a> <div class="method-heading"> <a href="Handler.src/M000068.html" target="Code" class="method-signature" onclick="popupCode('Handler.src/M000068.html');return false;"> <span class="method-name">default</span><span class="method-args">(options = {})</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000066" class="method-detail"> <a name="M000066"></a> <div class="method-heading"> <a href="Handler.src/M000066.html" target="Code" class="method-signature" onclick="popupCode('Handler.src/M000066.html');return false;"> <span class="method-name">get</span><span class="method-args">(server)</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000067" class="method-detail"> <a name="M000067"></a> <div class="method-heading"> <a href="Handler.src/M000067.html" target="Code" class="method-signature" onclick="popupCode('Handler.src/M000067.html');return false;"> <span class="method-name">pick</span><span class="method-args">(server_names)</span> </a> </div> <div class="method-description"> <p> Select first available <a href="../Rack.html">Rack</a> handler given an `Array` of server names. Raises `LoadError` if no handler was found. </p> <pre> > pick ['thin', 'webrick'] => Rack::Handler::WEBrick </pre> </div> </div> <div id="method-M000070" class="method-detail"> <a name="M000070"></a> <div class="method-heading"> <a href="Handler.src/M000070.html" target="Code" class="method-signature" onclick="popupCode('Handler.src/M000070.html');return false;"> <span class="method-name">register</span><span class="method-args">(server, klass)</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000069" class="method-detail"> <a name="M000069"></a> <div class="method-heading"> <a href="Handler.src/M000069.html" target="Code" class="method-signature" onclick="popupCode('Handler.src/M000069.html');return false;"> <span class="method-name">try_require</span><span class="method-args">(prefix, const_name)</span> </a> </div> <div class="method-description"> <p> Transforms server-name constants to their canonical form as filenames, then tries to require them but silences the LoadError if not found </p> <p> Naming convention: </p> <pre> Foo # => 'foo' FooBar # => 'foo_bar.rb' FooBAR # => 'foobar.rb' FOObar # => 'foobar.rb' FOOBAR # => 'foobar.rb' FooBarBaz # => 'foo_bar_baz.rb' </pre> </div> </div> </div> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> </div> </body> </html>