Class: Mongrel2::Config::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/mongrel2/config/handler.rb

Overview

Mongrel2 Handler configuration class

Constant Summary collapse

VALID_SPEC_SCHEMES =

The list of 0mq transports Mongrel2 can use; “You need to use the ZeroMQ syntax for configuring them, but this means with one configuration format you can use handlers that are using UDP, TCP, Unix, or PGM transports.” Note that I’m assuming by ‘udp’ Zed means ‘epgm’, as I can’t find any udp 0mq transport.

%w[epgm tcp ipc pgm]
VALID_PROTOCOLS =

The list of valid protocols – handler.h: typedef enum { HANDLER_PROTO_JSON, HANDLER_PROTO_TNET } handler_protocol_t;

%w[json tnetstring]

Instance Method Summary collapse

Instance Method Details

#routesObject

The routes that refer to this Handler



25
# File 'lib/mongrel2/config/handler.rb', line 25

one_to_many :routes, :key => :target_id, :conditions => { target_type: 'handler' }

#validateObject

Validate the object prior to saving it.



53
54
55
56
57
58
# File 'lib/mongrel2/config/handler.rb', line 53

def validate
	self.validate_idents
	self.validate_specs
	self.validate_protocol
	self.validate_uniqueness
end