Class: Push::Daemon::Apns
- Inherits:
-
Object
- Object
- Push::Daemon::Apns
- Defined in:
- lib/push/daemon/apns.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
Instance Method Summary collapse
- #connectiontype ⇒ Object
-
#initialize(options) ⇒ Apns
constructor
A new instance of Apns.
- #pushconnections ⇒ Object
- #start_feedback ⇒ Object
- #stop ⇒ Object
- #stop_feedback ⇒ Object
- #totalconnections ⇒ Object
Constructor Details
#initialize(options) ⇒ Apns
Returns a new instance of Apns.
6 7 8 9 10 11 |
# File 'lib/push/daemon/apns.rb', line 6 def initialize() self.configuration = @feedback_receiver = ApnsSupport::FeedbackReceiver.new(self) start_feedback end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
4 5 6 |
# File 'lib/push/daemon/apns.rb', line 4 def configuration @configuration end |
Instance Method Details
#connectiontype ⇒ Object
22 23 24 |
# File 'lib/push/daemon/apns.rb', line 22 def connectiontype ApnsSupport::ConnectionApns end |
#pushconnections ⇒ Object
13 14 15 |
# File 'lib/push/daemon/apns.rb', line 13 def pushconnections self.configuration[:connections] end |
#start_feedback ⇒ Object
26 27 28 |
# File 'lib/push/daemon/apns.rb', line 26 def start_feedback @feedback_receiver.start end |
#stop ⇒ Object
34 35 36 |
# File 'lib/push/daemon/apns.rb', line 34 def stop stop_feedback end |
#stop_feedback ⇒ Object
30 31 32 |
# File 'lib/push/daemon/apns.rb', line 30 def stop_feedback @feedback_receiver.stop end |
#totalconnections ⇒ Object
17 18 19 20 |
# File 'lib/push/daemon/apns.rb', line 17 def totalconnections # + feedback pushconnections + 1 end |