- @properties = Hash.new()
- @id = @@nextProcessId++
-
- argc = args.size
-
- if argc == 0 # Default initializer
- super() {
- @id = 0
- @bind = 0
- @name = ""
- @pargs = Array.new()
- start()
- if $DEBUG
- puts "Init Default Initializer...Nothing to do...Bye"
- end
- }
-
- # 2 arguments: (HostName,Name) Or (Host , Name)
- elsif argc == 2
- super(){
- type = args[0].type()
- if ( type.to_s == "String")
- host = Host.getByName(args[0])
- elsif ( type.to_s == "MSG::Host")
- host = args[0]
- else
- raise "first argument of type "+args[0].type().to_s+", but expecting either String or MSG::Host"
- end
- if $DEBUG
- puts host
- end
- raise "Process name cannot be null" if args[1].empty?
- @name = args[1]
- if $DEBUG
- puts @name
- end
- @pargs = Array.new() # No Args[] Passed in Arguments
- start()
- createProcess(self,host)
- if $DEBUG
- puts "Initilize with 2 args"
- end