Module: Celluloid::Notifications

### Home Classes Methods

### In Files

- lib/celluloid/notifications.rb

### Namespace

- CLASS Celluloid::Notifications::Fanout
- CLASS Celluloid::Notifications::Subscriber

### Methods

- ::notifier
- ::publish
- #subscribe
- #unsubscribe

### Class/Module Index

Quicksearch

- Celluloid
- Celluloid::Incident
- Celluloid::IncidentLogger
- Celluloid::IncidentLogger::Severity
- Celluloid::IncidentReporter
- Celluloid::IncidentReporter::Formatter
- Celluloid::Internals
- Celluloid::Internals::CPUCounter
- Celluloid::Internals::CallChain
- Celluloid::Internals::Handler
- Celluloid::Internals::Handlers
- Celluloid::Internals::Links
- Celluloid::Internals::Logger
- Celluloid::Internals::Logger::WithBacktrace
- Celluloid::Internals::Method
- Celluloid::Internals::Properties
- Celluloid::Internals::Receiver
- Celluloid::Internals::Receivers
- Celluloid::Internals::Registry
- Celluloid::Internals::Response
- Celluloid::Internals::Response::Block
- Celluloid::Internals::Response::Error
- Celluloid::Internals::Response::Success
- Celluloid::Internals::Signals
- Celluloid::Internals::Stack
- Celluloid::Internals::Stack::ActorState
- Celluloid::Internals::Stack::CellState
- Celluloid::Internals::Stack::DisplayBacktrace
- Celluloid::Internals::Stack::Dump
- Celluloid::Internals::Stack::Summary
- Celluloid::Internals::Stack::TaskState
- Celluloid::Internals::Stack::ThreadState
- Celluloid::Internals::TaskSet
- Celluloid::Internals::ThreadHandle
- Celluloid::Internals::UUID
- Celluloid::LogEvent
- Celluloid::Notifications
- Celluloid::Notifications::Fanout
- Celluloid::Notifications::Subscriber
- Celluloid::Probe
- Celluloid::RingBuffer

No matching classes.

# Celluloid::Notifications

### Public Class Methods

notifier() click to toggle source

    # File lib/celluloid/notifications.rb, line 3
    def self.notifier
      Actor[:notifications_fanout] || fail(DeadActorError, "notifications fanout actor not running")
    end

publish(pattern, *args) click to toggle source

    # File lib/celluloid/notifications.rb, line 7
    def publish(pattern, *args)
      Celluloid::Notifications.notifier.publish(pattern, *args)
    rescue DeadActorError
      # Bad shutdown logic. Oh well....
      # TODO: needs a tests
    end

### Public Instance Methods

subscribe(pattern, method) click to toggle source

    # File lib/celluloid/notifications.rb, line 16
    def subscribe(pattern, method)
      Celluloid::Notifications.notifier.subscribe(Actor.current, pattern, method)
    end

unsubscribe(*args) click to toggle source

    # File lib/celluloid/notifications.rb, line 20
    def unsubscribe(*args)
      Celluloid::Notifications.notifier.unsubscribe(*args)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.