Class: Rapns::Daemon::Gcm::DeliveryHandler
Constant Summary
DeliveryHandler::WAKEUP
Instance Attribute Summary
#queue
Instance Method Summary
collapse
#start, #stop, #wait, #wakeup
#reflect
Constructor Details
Returns a new instance of DeliveryHandler.
5
6
7
8
|
# File 'lib/rapns/daemon/gcm/delivery_handler.rb', line 5
def initialize(app)
@app = app
@http = Net::HTTP::Persistent.new('rapns')
end
|
Instance Method Details
#deliver(notification, batch) ⇒ Object
10
11
12
|
# File 'lib/rapns/daemon/gcm/delivery_handler.rb', line 10
def deliver(notification, batch)
Rapns::Daemon::Gcm::Delivery.new(@app, @http, notification, batch).perform
end
|
#stopped ⇒ Object
14
15
16
|
# File 'lib/rapns/daemon/gcm/delivery_handler.rb', line 14
def stopped
@http.shutdown
end
|