Package com.discoverydns.dnsapiclient.framework.impl.basic

Examples of com.discoverydns.dnsapiclient.framework.impl.basic.BasicCommandProcessor


  }

  private BlockingCommandExecutor createBlockingCommandExecutor(
      ClientTransactionIdStrategy clientTransactionIdStrategy,
      TransactionLogHandler transactionLogHandler, WebTarget baseWebTarget) {
    final CommandProcessor commandProcessor = new BasicCommandProcessor();
    // UserCommands
    commandProcessor.subscribe(UserGetCommand.class,
        new UserGetCommandHandler(baseWebTarget));
    commandProcessor.subscribe(UserListCommand.class,
        new UserListCommandHandler(baseWebTarget));
    // PlanCommands
    commandProcessor.subscribe(PlanGetCommand.class,
        new PlanGetCommandHandler(baseWebTarget));
    commandProcessor.subscribe(PlanListCommand.class,
        new PlanListCommandHandler(baseWebTarget));
    // NameServerSetCommands
    commandProcessor.subscribe(NameServerSetGetCommand.class,
        new NameServerSetGetCommandHandler(baseWebTarget));
    commandProcessor.subscribe(NameServerSetListCommand.class,
        new NameServerSetListCommandHandler(baseWebTarget));
    // NameServerInterfaceSetCommands
    commandProcessor.subscribe(NameServerInterfaceSetGetCommand.class,
        new NameServerInterfaceSetGetCommandHandler(baseWebTarget));
    // AccountCommands
    commandProcessor.subscribe(AccountGetCommand.class,
        new AccountGetCommandHandler(baseWebTarget));
    // ZoneCommands
    commandProcessor.subscribe(ZoneGetCommand.class,
        new ZoneGetCommandHandler(baseWebTarget));
    commandProcessor.subscribe(ZoneListCommand.class,
        new ZoneListCommandHandler(baseWebTarget));
    commandProcessor.subscribe(ZoneCreateCommand.class,
        new ZoneCreateCommandHandler(baseWebTarget));
    commandProcessor.subscribe(ZoneUpdateCommand.class,
        new ZoneUpdateCommandHandler(baseWebTarget));
    commandProcessor.subscribe(ZoneUpdateResourceRecordsCommand.class,
        new ZoneUpdateResourceRecordsCommandHandler(baseWebTarget));
    commandProcessor.subscribe(ZoneDeleteCommand.class,
        new ZoneDeleteCommandHandler(baseWebTarget));
    commandProcessor.subscribe(ZoneGetQueryUsageCommand.class,
        new ZoneGetQueryUsageCommandHandler(baseWebTarget));
    commandProcessor.subscribe(ZoneGetZoneFileCommand.class,
        new ZoneGetZoneFileCommandHandler(baseWebTarget));
    // MessageCommands
    commandProcessor.subscribe(MessagePollCommand.class,
        new MessagePollCommandHandler(baseWebTarget));
    commandProcessor.subscribe(MessageGetCommand.class,
        new MessageGetCommandHandler(baseWebTarget));
    commandProcessor.subscribe(MessageAcknowledgeCommand.class,
        new MessageAcknowledgeCommandHandler(baseWebTarget));

    // Interceptors
    commandProcessor
        .addCommandInterceptor(new TransactionLogCommandInterceptor(
            transactionLogHandler));
    commandProcessor
        .addCommandInterceptor(new ClientTransactionIdCommandInterceptor(
            clientTransactionIdStrategy));
    commandProcessor
        .addCommandInterceptor(new StopwatchCommandInterceptor());

    return new BlockingCommandExecutor(commandProcessor);
  }
View Full Code Here


  }

    private BlockingCommandExecutor createBlockingCommandExecutor(
            ClientTransactionIdStrategy clientTransactionIdStrategy,
            TransactionLogHandler transactionLogHandler, WebTarget baseWebTarget) {
        final CommandProcessor commandProcessor = new BasicCommandProcessor();
        // UserCommands
        commandProcessor.subscribe(UserGetCommand.class,
                new UserGetCommandHandler(baseWebTarget));
        commandProcessor.subscribe(UserListCommand.class,
                new UserListCommandHandler(baseWebTarget));
        // PlanCommands
        commandProcessor.subscribe(PlanGetCommand.class,
                new PlanGetCommandHandler(baseWebTarget));
        commandProcessor.subscribe(PlanListCommand.class,
                new PlanListCommandHandler(baseWebTarget));
        // NameServerSetCommands
        commandProcessor.subscribe(NameServerSetGetCommand.class,
                new NameServerSetGetCommandHandler(baseWebTarget));
        commandProcessor.subscribe(NameServerSetListCommand.class,
                new NameServerSetListCommandHandler(baseWebTarget));
        // NameServerInterfaceSetCommands
        commandProcessor.subscribe(NameServerInterfaceSetGetCommand.class,
                new NameServerInterfaceSetGetCommandHandler(baseWebTarget));
        // AccountCommands
        commandProcessor.subscribe(AccountGetCommand.class,
                new AccountGetCommandHandler(baseWebTarget));
        // ZoneCommands
        commandProcessor.subscribe(ZoneGetCommand.class,
                new ZoneGetCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneListCommand.class,
                new ZoneListCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneCreateCommand.class,
                new ZoneCreateCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneUpdateCommand.class,
                new ZoneUpdateCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneUpdateResourceRecordsCommand.class,
                new ZoneUpdateResourceRecordsCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneDeleteCommand.class,
                new ZoneDeleteCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneGetQueryUsageCommand.class,
                new ZoneGetQueryUsageCommandHandler(baseWebTarget));

        // Interceptors
        commandProcessor
                .addCommandInterceptor(new TransactionLogCommandInterceptor(
                        transactionLogHandler));
        commandProcessor
                .addCommandInterceptor(new ClientTransactionIdCommandInterceptor(
                        clientTransactionIdStrategy));
        commandProcessor
                .addCommandInterceptor(new StopwatchCommandInterceptor());

        return new BlockingCommandExecutor(
                commandProcessor);
    }
View Full Code Here

  }

    private BlockingCommandExecutor createBlockingCommandExecutor(
            ClientTransactionIdStrategy clientTransactionIdStrategy,
            TransactionLogHandler transactionLogHandler, WebTarget baseWebTarget) {
        final CommandProcessor commandProcessor = new BasicCommandProcessor();
        // UserCommands
        commandProcessor.subscribe(UserGetCommand.class,
                new UserGetCommandHandler(baseWebTarget));
        commandProcessor.subscribe(UserListCommand.class,
                new UserListCommandHandler(baseWebTarget));
        // PlanCommands
        commandProcessor.subscribe(PlanGetCommand.class,
                new PlanGetCommandHandler(baseWebTarget));
        commandProcessor.subscribe(PlanListCommand.class,
                new PlanListCommandHandler(baseWebTarget));
        // NameServerSetCommands
        commandProcessor.subscribe(NameServerSetGetCommand.class,
                new NameServerSetGetCommandHandler(baseWebTarget));
        commandProcessor.subscribe(NameServerSetListCommand.class,
                new NameServerSetListCommandHandler(baseWebTarget));
        // NameServerInterfaceSetCommands
        commandProcessor.subscribe(NameServerInterfaceSetGetCommand.class,
                new NameServerInterfaceSetGetCommandHandler(baseWebTarget));
        // AccountCommands
        commandProcessor.subscribe(AccountGetCommand.class,
                new AccountGetCommandHandler(baseWebTarget));
        // ZoneCommands
        commandProcessor.subscribe(ZoneGetCommand.class,
                new ZoneGetCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneListCommand.class,
                new ZoneListCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneCreateCommand.class,
                new ZoneCreateCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneUpdateCommand.class,
                new ZoneUpdateCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneUpdateResourceRecordsCommand.class,
                new ZoneUpdateResourceRecordsCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneDeleteCommand.class,
                new ZoneDeleteCommandHandler(baseWebTarget));
        commandProcessor.subscribe(ZoneGetQueryUsageCommand.class,
                new ZoneGetQueryUsageCommandHandler(baseWebTarget));

        // Interceptors
        commandProcessor
                .addCommandInterceptor(new TransactionLogCommandInterceptor(
                        transactionLogHandler));
        commandProcessor
                .addCommandInterceptor(new ClientTransactionIdCommandInterceptor(
                        clientTransactionIdStrategy));
        commandProcessor
                .addCommandInterceptor(new StopwatchCommandInterceptor());

        return new BlockingCommandExecutor(
                commandProcessor);
    }
View Full Code Here

TOP

Related Classes of com.discoverydns.dnsapiclient.framework.impl.basic.BasicCommandProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.