Package proton :: Module reactor :: Class Reactor

[frames] | no frames]

# Class Reactor

source code

         object --+
                  |
    wrapper.Wrapper --+
                      |
                     Reactor

Known Subclasses:
  - Container

Instance Methods

__init__(self, *handlers, **kwargs) x.__init__(...) initializes x; see help(type(x)) for signature | source code

on_error(self, info) | source code

yield_(self) | source code

mark(self) | source code

run(self) | source code

wakeup(self) | source code

start(self) | source code

process(self) | source code

stop(self) | source code

schedule(self, delay, task) | source code

acceptor(self, host, port, handler=None) | source code

connection(self, handler=None) Deprecated: use connection_to_host() instead | source code

connection_to_host(self, host, port, handler=None) Create an outgoing Connection that will be managed by the reactor. | source code

set_connection_host(self, connection, host, port) Change the address used by the connection. | source code

get_connection_address(self, connection) This may be used to retrieve the remote peer address. | source code

selectable(self, handler=None) | source code

update(self, sel) | source code

push_event(self, obj, etype) | source code

Inherited from `wrapper.Wrapper`: `__del__`, `__delattr__`, `__eq__`, `__getattr__`, `__hash__`, `__ne__`, `__repr__`, `__setattr__` Inherited from `object`: `__format__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__str__`, `__subclasshook__`

Static Methods

wrap(impl) | source code

Properties
| global_handler
| timeout
| handler
| quiesced
Inherited from `object`: `__class__`

Method Details

### __init__(self, *handlers, **kwargs)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
  (inherited documentation)

### connection_to_host(self, host, port, handler=None)

source code

Create an outgoing Connection that will be managed by the reactor. The reator's pn_iohandler will create a socket connection to the host once the connection is opened.

### set_connection_host(self, connection, host, port)

source code

Change the address used by the connection. The address is used by the reactor's iohandler to create an outgoing socket connection. This must be set prior to opening the connection.

### get_connection_address(self, connection)

source code

This may be used to retrieve the remote peer address.

Returns:
  string containing the address in URL format or None if no address is available. Use the proton.Url class to create a Url object from the returned value.

Property Details

### global_handler

Get Method:
  _get_global(self)
Set Method:
  _set_global(self, handler)

### timeout

Get Method:
  _get_timeout(self)
Set Method:
  _set_timeout(self, secs)

### handler

Get Method:
  _get_handler(self)
Set Method:
  _set_handler(self, handler)

### quiesced

Get Method:
  unreachable.quiesced(self)