Class: Hashdot::Daemon::ShutdownHandler

Inherits:
Object
  • Object
show all
Includes:
RJack
Defined in:
lib/hashdot-test-daemon.rb

Constant Summary collapse

Thread =
Java::java.lang.Thread
Runtime =
Java::java.lang.Runtime

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.registerObject



65
66
67
# File 'lib/hashdot-test-daemon.rb', line 65

def self.register
  Runtime::runtime.add_shutdown_hook( Thread.new( new ) )
end

Instance Method Details

#runObject



60
61
62
63
# File 'lib/hashdot-test-daemon.rb', line 60

def run
  SLF4J[self.class].info "Shutting down (sleep 3)"
  sleep 3.0
end