Example usage for com.google.common.collect ImmutableMultimap toString

List of usage examples for com.google.common.collect ImmutableMultimap toString

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableMultimap toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:org.knowm.dropwizard.sundial.tasks.RemoveJobTask.java

@Override
public void execute(ImmutableMultimap<String, String> parameters, PrintWriter output) throws Exception {

    logger.info(parameters.toString());

    String jobName = (String) parameters.get("JOB_NAME").toArray()[0];

    SundialJobScheduler.removeJob(jobName);

}

From source file:org.knowm.dropwizard.sundial.tasks.StopJobTask.java

@Override
public void execute(ImmutableMultimap<String, String> parameters, PrintWriter output) throws Exception {

    logger.info(parameters.toString());

    String jobName = (String) parameters.get("JOB_NAME").toArray()[0];

    SundialJobScheduler.stopJob(jobName);

}

From source file:org.knowm.dropwizard.sundial.tasks.StartJobTask.java

@Override
public void execute(ImmutableMultimap<String, String> parameters, PrintWriter output) throws Exception {

    logger.info(parameters.toString());

    Map<String, Object> params = new HashMap<String, Object>();

    for (Entry<String, String> entry : parameters.entries()) {
        params.put(entry.getKey(), entry.getValue());
    }//  w  w  w  . ja  v a 2 s.  co  m

    String jobName = (String) parameters.get("JOB_NAME").toArray()[0];

    SundialJobScheduler.startJob(jobName, params);
}

From source file:org.knowm.dropwizard.sundial.tasks.AddJobTask.java

@Override
public void execute(ImmutableMultimap<String, String> parameters, PrintWriter output) throws Exception {

    logger.info(parameters.toString());

    Map<String, Object> params = new HashMap<String, Object>();

    for (Entry<String, String> entry : parameters.entries()) {
        params.put(entry.getKey(), entry.getValue());
    }/*  www . j a v  a  2  s.  co m*/

    String jobName = (String) parameters.get("JOB_NAME").toArray()[0];
    String jobClass = (String) parameters.get("JOB_CLASS").toArray()[0];

    SundialJobScheduler.addJob(jobName, jobClass, params, false);

}