Class: Synapse::ProcessManager::ProcessFactory Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/synapse/process_manager/process_factory.rb

Overview

This class is abstract.

Represents a mechanism for create instances of processes

Direct Known Subclasses

GenericProcessFactory

Instance Method Summary collapse

Instance Method Details

#create(process_type) ⇒ Process

This method is abstract.

Creates a new instance of a process of a given type

The returned process will be fully initialized and any resources required will be provided through dependency injection.

Parameters:

  • process_type (Class)

Returns:

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/synapse/process_manager/process_factory.rb', line 14

def create(process_type)
  raise NotImplementedError
end

#supports(process_type) ⇒ Boolean

This method is abstract.

Returns true if processes of the given type can be created by this factory

Parameters:

  • process_type (Class)

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/synapse/process_manager/process_factory.rb', line 23

def supports(process_type)
  raise NotImplementedError
end