Sha256: b982f26e1e241fe02aa67e35f994737678c68b356589baebd518fcb4f534ae72

Contents?: true

Size: 473 Bytes

Versions: 26

Compression:

Stored size: 473 Bytes

Contents

module Rpush
  module Daemon
    module Dispatcher
      class Http
        def initialize(app, delivery_class, _options = {})
          @app = app
          @delivery_class = delivery_class
          @http = Net::HTTP::Persistent.new('rpush')
        end

        def dispatch(payload)
          @delivery_class.new(@app, @http, payload.notification, payload.batch).perform
        end

        def cleanup
          @http.shutdown
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rpush-2.7.0-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.7.0 lib/rpush/daemon/dispatcher/http.rb
rpush-2.6.0-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.6.0 lib/rpush/daemon/dispatcher/http.rb
rpush-2.5.0 lib/rpush/daemon/dispatcher/http.rb
rpush-2.4.0-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.4.0 lib/rpush/daemon/dispatcher/http.rb
rpush-2.3.2-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.3.2 lib/rpush/daemon/dispatcher/http.rb
rpush-2.3.1-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.3.1 lib/rpush/daemon/dispatcher/http.rb
rpush-2.3.0-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.3.0 lib/rpush/daemon/dispatcher/http.rb
rpush-2.3.0.rc1 lib/rpush/daemon/dispatcher/http.rb
rpush-2.2.0-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.2.0 lib/rpush/daemon/dispatcher/http.rb
rpush-2.1.0-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.1.0 lib/rpush/daemon/dispatcher/http.rb
rpush-2.0.1-java lib/rpush/daemon/dispatcher/http.rb
rpush-2.0.1 lib/rpush/daemon/dispatcher/http.rb