Package org.waveprotocol.box.server.robots.operations

Examples of org.waveprotocol.box.server.robots.operations.OperationService


   * @param operation the type of the operation to register for
   * @param service the {@link OperationService} to be registered
   */
  protected final void register(OperationType operation, OperationService service) {
    // Do a put first so we can make it use a concurrent map if needed.
    OperationService oldValue = operationMap.put(operation, service);
    if (oldValue != null) {
      LOG.warning("The OperationService for " + operation.name() + " was overwritten");
    }
  }
View Full Code Here


   * @param author the author of the operation.
   */
  public static void executeOperation(OperationRequest operation,
      OperationServiceRegistry operationRegistry, OperationContext context, ParticipantId author) {
    try {
      OperationService service =
          operationRegistry.getServiceFor(OperationUtil.getOperationType(operation));
      ParticipantId proxyParticipant = OperationUtil.computeParticipant(operation, author);
      service.execute(operation, context, proxyParticipant);
    } catch (InvalidRequestException e) {
      LOG.warning("Operation " + operation + " failed to execute", e);
      context.constructErrorResponse(operation, e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.server.robots.operations.OperationService

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.