Class: Pione::Command::FrontOwnerCommand

Inherits:
BasicCommand
  • Object
show all
Defined in:
lib/pione/command/front-owner-command.rb

Direct Known Subclasses

ChildProcess, DaemonProcess, PioneClient, PioneRelay

Instance Method Summary collapse

Methods inherited from BasicCommand

inherited, run

Methods included from ClassInterface

#program_message, #program_name, #set_program_message, #set_program_name

Methods included from Pione::CommandOption::OptionInterface

#command_options, #define_option, extended, #remove_option, #use_option_module

Methods included from InstanceInterface

#program_message, #program_name

Instance Method Details

#create_frontBasicFront

Creates a front server. This method should be overridden in subclasses.

Returns:

  • (BasicFront)

    front server

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/pione/command/front-owner-command.rb', line 27

def create_front
  raise NotImplementedError
end

#runObject

Runs the command.



9
10
11
12
13
14
15
16
# File 'lib/pione/command/front-owner-command.rb', line 9

def run
  parse_options
  validate_options
  setup_front
  prepare
  $PROGRAM_NAME = program_name
  start
end

#setup_frontvoid

This method returns an undefined value.

Setups font server.



20
21
22
# File 'lib/pione/command/front-owner-command.rb', line 20

def setup_front
  Global.front = create_front
end

#terminateObject



31
32
33
34
# File 'lib/pione/command/front-owner-command.rb', line 31

def terminate
  super
  DRb.stop_service
end