Package org.platformlayer

Examples of org.platformlayer.PlatformLayerEndpointInfo


  @Handler
  public void handler() throws OpsException {
    if (OpsContext.isConfigure()) {
      String key = model.getKey().getUrl();
      PlatformLayerKey target = model.targetItem;
      PlatformLayerEndpointInfo endpoint = platformLayer.getEndpointInfo(target);
      JobSchedule schedule = model.schedule;
      Action action = model.action;

      actionScheduler.putJob(key, endpoint, schedule, target, action);
    }
View Full Code Here


      CryptoKey secret = FathomdbCrypto.deserializeKey(Hex.fromHex(in.secret.plaintext()));
      DirectAuthenticationToken authenticationToken = new DirectAuthenticationToken(token, secret);
      authenticator = new DirectAuthenticator(authenticationToken);
    }

    PlatformLayerEndpointInfo out = new PlatformLayerEndpointInfo(authenticator, platformlayerBaseUrl, projectId,
        trustKeys);
    return out;
  }
View Full Code Here

  }

  private Runnable toRunnable(final ActionTask task) {
    final PlatformLayerKey target = task.target;

    final PlatformLayerEndpointInfo endpoint = rehydrateEndpoint(task.endpoint);

    Runnable runnable = new Runnable() {
      @Override
      public void run() {
        try {
          PlatformLayerClient platformLayer = HttpPlatformLayerClient.build(httpStrategy,
              endpoint.getPlatformlayerBaseUrl(), endpoint.getAuthenticator(), endpoint.getProjectId(),
              endpoint.getTrustKeys());

          platformLayer.doAction(target, task.action);

          // TODO: Wait for task completion??
          // TODO: Link job id??
View Full Code Here

TOP

Related Classes of org.platformlayer.PlatformLayerEndpointInfo

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.