Apache Mesos
Public Member Functions | List of all members
process::firewall::FirewallRule Class Referenceabstract

A 'FirewallRule' describes an interface which provides control over incoming HTTP requests while also taking the underlying connection into account. More...

#include <firewall.hpp>

Inheritance diagram for process::firewall::FirewallRule:
process::firewall::DisabledEndpointsFirewallRule

Public Member Functions

 FirewallRule ()
 
virtual ~FirewallRule ()
 
virtual Option< http::Responseapply (const network::inet::Socket &socket, const http::Request &request)=0
 Verify rule by applying it to an HTTP request and its underlying socket connection. More...
 

Detailed Description

A 'FirewallRule' describes an interface which provides control over incoming HTTP requests while also taking the underlying connection into account.

Concrete classes based on this interface must implement the 'apply' method.

Rules can be installed using the free function 'process::firewall::install()' defined in 'process.hpp'.

Constructor & Destructor Documentation

process::firewall::FirewallRule::FirewallRule ( )
inline
virtual process::firewall::FirewallRule::~FirewallRule ( )
inlinevirtual

Member Function Documentation

virtual Option<http::Response> process::firewall::FirewallRule::apply ( const network::inet::Socket socket,
const http::Request request 
)
pure virtual

Verify rule by applying it to an HTTP request and its underlying socket connection.

Parameters
socketSocket used to deliver the HTTP request.
requestHTTP request made by the client to libprocess.
Returns
If the rule verification fails, i.e. the rule didn't match, a pointer to a 'http::Response' object containing the HTTP error code and possibly a message indicating the reason for failure. Otherwise an unset 'Option' object.

Implemented in process::firewall::DisabledEndpointsFirewallRule.


The documentation for this class was generated from the following file: