Apache-Wombat

 view release on metacpan or  search on metacpan

docs/api/Apache/Wombat/Connector.html  view on Meta::CPAN

	<LI><A HREF="#lifecycle methods">LIFECYCLE METHODS</A></LI>
	<LI><A HREF="#see also">SEE ALSO</A></LI>
	<LI><A HREF="#author">AUTHOR</A></LI>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="name">NAME</A></H1>
<P>Apache::Wombat::Connector - Apache/mod_perl connector</P>
<P>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
  # My/Handler.pm</PRE>
<PRE>
  my $connector = Apache::Wombat::Connector-&gt;new();
  $connector-&gt;setName('Apache connector');
  $connector-&gt;setScheme('http');
  $connector-&gt;setSecure(undef)</PRE>
<PRE>
  # ... create a Service as $service
  # calls $connector-&gt;setContainer() internally
  $service-&gt;addConnector($connector);</PRE>
<PRE>
  sub child_init_handler {
      my $r = shift;
      $connector-&gt;start();
      return Apache::Constants::OK;
  }</PRE>
<PRE>
  sub handler {
      my $r = shift;
      $connector-&gt;process($r);
      return $r-&gt;status();
  }</PRE>
<PRE>
  sub child_exit_handler {
      my $r = shift;
      $connector-&gt;stop();
      return Apache::Constants::OK;
  }</PRE>
<PRE>
  # httpd.conf:
  &lt;Location /&gt;
    SetHandler perl-script
    PerlChildInitHandler My::Handler::child_init_handler
    PerlHandler          My::Handler::handler
    PerlChildExitHandler My::Handler::child_exit_handler
  &lt;/Location&gt;</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This Connector receives requests from and returns responses to an
Apache web server within which Wombat is embedded. It does not listen
on a socket but rather provides a <A HREF="#item_process"><CODE>process()</CODE></A> entry point with which
it receives and returns an <STRONG>Apache</STRONG> instance. It provides HttpRequest
and HttpResponse implementations that delegate many fields and methods
to an underlying <STRONG>Apache::Request</STRONG> instance.</P>
<P>ApacheConnector assumes an Apache 1 &amp; mod_perl 1 single-threaded
multi-process environment. It's unknown whether it will work in any
other environment.</P>
<P>Requires mod_perl to be compiled with at least one of the following
options:</P>
<PRE>
  DYNAMIC=1
  PERL_TABLE_API=1
  EVERYTHING=1</PRE>
<P>
<HR>
<H1><A NAME="constructor">CONSTRUCTOR</A></H1>
<DL>
<DT><STRONG><A NAME="item_new"><CODE>new()</CODE></A></STRONG><BR>
<DD>
Create and return an instance, initializing fields to default values.
<P></P></DL>
<P>
<HR>
<H1><A NAME="accessor methods">ACCESSOR METHODS</A></H1>
<DL>
<DT><STRONG><A NAME="item_getContainer"><CODE>getContainer()</CODE></A></STRONG><BR>
<DD>
Return the Container used for processing Requests received by this
Connector.
<P></P>
<DT><STRONG><A NAME="item_setContainer"><CODE>setContainer($container)</CODE></A></STRONG><BR>
<DD>
Set the Container used for processing Requests received by this
Connector.
<P><STRONG>Parameters:</STRONG></P>
<DL>
<DT><STRONG><A NAME="item_%24container">$container</A></STRONG><BR>
<DD>
the <STRONG>Wombat::Container</STRONG> used for processing Requests
<P></P></DL>
<DT><STRONG><A NAME="item_getName"><CODE>getName()</CODE></A></STRONG><BR>
<DD>
Return the display name of this Connector.
<P></P>
<DT><STRONG><A NAME="item_getScheme"><CODE>getScheme()</CODE></A></STRONG><BR>
<DD>
Return the scheme that will be assigned to Requests recieved through
this Connector. Default value is <EM>http</EM>.
<P></P>
<DT><STRONG><A NAME="item_setScheme"><CODE>setScheme($scheme)</CODE></A></STRONG><BR>
<DD>
Set the scheme that will be assigned to Requests received through this
Connector.
<P><STRONG>Parameters:</STRONG></P>
<DL>
<DT><STRONG><A NAME="item_%24scheme">$scheme</A></STRONG><BR>
<DD>
the scheme
<P></P></DL>
<DT><STRONG><A NAME="item_getSecure"><CODE>getSecure()</CODE></A></STRONG><BR>
<DD>
Return the secure connection flag that will be assigned to Requests
received through this Connector. Default value is false.
<P></P>
<DT><STRONG><A NAME="item_setSecure"><CODE>setSecure($secure)</CODE></A></STRONG><BR>



( run in 1.012 second using v1.01-cache-2.11-cpan-39bf76dae61 )