def message(self, contents):
contents = json.loads(contents.decode('<STR_LIT:utf-8>'))<EOL>tp = contents['<STR_LIT:type>']<EOL>if tp == '<STR_LIT>':<EOL><INDENT>self.monitor.stopProcess(contents['<STR_LIT:name>'])<EOL>log.msg("<STR_LIT>", contents['<STR_LIT:name>'])<EOL><DEDENT>elif tp == '<STR_LIT>':<EOL><INDENT>self.monitor.restartAll()<EOL>log.msg("<STR_LIT>")<EOL><DEDENT>elif tp == '<STR_LIT>':<EOL><INDENT>log.msg("<STR_LIT>", contents['<STR_LIT>'])<EOL>for name in self._groupToProcess[contents['<STR_LIT>']]:<EOL><INDENT>log.msg("<STR_LIT>", name)<EOL>self.monitor.stopProcess(name)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>', contents)<EOL><DEDENT>
Respond to a restart or a restart-all message

        :params contents: string, contents of message
           parsed as JSON, and assumed to have a 'type'
           key, with value either 'restart' or 'restart-all'.
           If the value is 'restart', another key
           ('value') should exist with a logical process
           name.