// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/AnCommandHandledByMultipleHandlers.java
// public class AnCommandHandledByMultipleHandlers {
// 
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/CommandHandledByAPrivateMethod.java
// public class CommandHandledByAPrivateMethod {
// 
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/FailingCommand.java
// public class FailingCommand {
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/FailingCommandWithCheckedException.java
// public class FailingCommandWithCheckedException {
// 
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/HelloCommand.java
// public class HelloCommand {
// 
//   private String name;
// 
//   public HelloCommand(String name) {
//     this.name = name;
//   }
// 
//   public String getName() {
//     return name;
//   }
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/ValidatingCommand.java
// public class ValidatingCommand {
// 
//   @NotNull
//   private String message;
// 
//   public ValidatingCommand(String message) {
//     this.message = message;
//   }
// }


import eu.tripledframework.eventbus.Handler;
import eu.tripledframework.eventbus.Handles;
import eu.tripledframework.eventbus.command.AnCommandHandledByMultipleHandlers;
import eu.tripledframework.eventbus.command.CommandHandledByAPrivateMethod;
import eu.tripledframework.eventbus.command.FailingCommand;
import eu.tripledframework.eventbus.command.FailingCommandWithCheckedException;
import eu.tripledframework.eventbus.command.HelloCommand;
import eu.tripledframework.eventbus.command.ValidatingCommand;
/*
 * Copyright 2015 TripleD framework.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package eu.tripledframework.eventbus.handler;


@Handler
public class TestCommandHandler {

  public boolean isHelloCommandHandled;
  public boolean isFailingCommandHandled;
  public boolean isValidatingCommandHandled;
  public boolean isCommandHandledByAPrivateMethodCalled;
  public int handledByFirstCount;
  public int handledBySecondCount;
  public String threadNameForExecute;

  @Handles(HelloCommand.class)
  public String stringReturning(HelloCommand command) {
    isHelloCommandHandled = true;
    threadNameForExecute = Thread.currentThread().getName();
    return "Hello " + command.getName();
  }

  @Handles(FailingCommand.class)
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/AnCommandHandledByMultipleHandlers.java
// public class AnCommandHandledByMultipleHandlers {
// 
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/CommandHandledByAPrivateMethod.java
// public class CommandHandledByAPrivateMethod {
// 
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/FailingCommand.java
// public class FailingCommand {
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/FailingCommandWithCheckedException.java
// public class FailingCommandWithCheckedException {
// 
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/HelloCommand.java
// public class HelloCommand {
// 
//   private String name;
// 
//   public HelloCommand(String name) {
//     this.name = name;
//   }
// 
//   public String getName() {
//     return name;
//   }
// }
// 
// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/command/ValidatingCommand.java
// public class ValidatingCommand {
// 
//   @NotNull
//   private String message;
// 
//   public ValidatingCommand(String message) {
//     this.message = message;
//   }
// }


// Path: eventbus-core/src/test/java/eu/tripledframework/eventbus/handler/TestCommandHandler.java
import eu.tripledframework.eventbus.Handler;
import eu.tripledframework.eventbus.Handles;
import eu.tripledframework.eventbus.command.AnCommandHandledByMultipleHandlers;
import eu.tripledframework.eventbus.command.CommandHandledByAPrivateMethod;
import eu.tripledframework.eventbus.command.FailingCommand;
import eu.tripledframework.eventbus.command.FailingCommandWithCheckedException;
import eu.tripledframework.eventbus.command.HelloCommand;
import eu.tripledframework.eventbus.command.ValidatingCommand;

/*
 * Copyright 2015 TripleD framework.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package eu.tripledframework.eventbus.handler;


@Handler
public class TestCommandHandler {

  public boolean isHelloCommandHandled;
  public boolean isFailingCommandHandled;
  public boolean isValidatingCommandHandled;
  public boolean isCommandHandledByAPrivateMethodCalled;
  public int handledByFirstCount;
  public int handledBySecondCount;
  public String threadNameForExecute;

  @Handles(HelloCommand.class)
  public String stringReturning(HelloCommand command) {
    isHelloCommandHandled = true;
    threadNameForExecute = Thread.currentThread().getName();
    return "Hello " + command.getName();
  }

  @Handles(FailingCommand.class)
  public String handleFailingCommand(FailingCommand failingCommand) {