Class: RedStorm::DSL::Topology::SpoutDefinition

Inherits:
ComponentDefinition show all
Defined in:
lib/red_storm/dsl/topology.rb

Instance Attribute Summary

Attributes inherited from ComponentDefinition

#clazz, #constructor_args, #id, #parallelism

Attributes inherited from Configurator

#config

Instance Method Summary collapse

Methods inherited from ComponentDefinition

#initialize, #is_java?, #output_fields

Methods inherited from Configurator

#initialize, #method_missing, #set

Constructor Details

This class inherits a constructor from RedStorm::DSL::Topology::ComponentDefinition

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RedStorm::Configurator

Instance Method Details

#new_instanceObject

WARNING non-dry see BoltDefinition#new_instance



43
44
45
46
47
48
49
50
51
# File 'lib/red_storm/dsl/topology.rb', line 43

def new_instance
  if @clazz.name == "Java::RedstormStormJruby::JRubyShellSpout"
    @clazz.new(constructor_args, @output_fields)
  elsif is_java?
    @clazz.new(*constructor_args)
  else
    JRubySpout.new(@clazz.base_class_path, @clazz.name, @output_fields)
  end
end