Examples of AppCoordinatorCallback


Examples of intf.mobile.coordinator.AppCoordinatorCallback

      storageID = ss.storeState(xmlState);
    } catch (Exception e) {
      logger.severe("Exception while creating/storing checkpoint", e);
      try {
        // send an exception message to the coordinator
        AppCoordinatorCallback coord = (AppCoordinatorCallback)
    HandleResolver.resolveHandle(coordinatorHandle,
               AppCoordinatorCallback.class.getName());
        coord.componentCheckpointed(getInstanceName(),
            individualStorageServiceURL,
            storageID,
            AppCoordinatorCallback.EXCEPTION);
      } catch (Exception ex) {
        logger.severe("Can't send notification to AppCoordinator", ex);
      }
    }

    // send a checkpoint completed message to the coordinator
    try
      AppCoordinatorCallback coord = (AppCoordinatorCallback)
        HandleResolver.resolveHandle(coordinatorHandle,
             AppCoordinatorCallback.class.getName());
      coord.componentCheckpointed(getInstanceName(),
          individualStorageServiceURL,
          storageID,
          AppCoordinatorCallback.CHECKPOINTED);
    } catch (Exception e) {
      logger.severe("Can't send notification to AppCoordinator", e);
View Full Code Here

Examples of intf.mobile.coordinator.AppCoordinatorCallback

    logger.severe("Uses port: " + usingPortName +
            " has been unregistered");

    // callback the AppCoordinator with an exception
    try {
      AppCoordinatorCallback coord = (AppCoordinatorCallback)
        HandleResolver.resolveHandle(coordinatorHandle,
             AppCoordinatorCallback.class.getName());
      coord.migrationApproval(providesComponentName,
            getComponentID().getInstanceName(),
            usingPortName,
            AppCoordinatorCallback.EXCEPTION);
    } catch (gov.cca.CCAException ce) {
      logger.severe("Can't invoke notification on remote AppCoordinator",
        ce);
    }

    return;
        }

        // wait till the port is released
        while (uInfo.getInUse()) {
    try {
      logger.finest("wait till the port is released");
      uInfo.wait();
    } catch (InterruptedException ie) {
      logger.severe("Caught InterruptedException while waiting", ie);
    }
        }

        // notify that this port requests migration
        uInfo.requestMigration()
       
        // Callback the App Coordinator notifying that the uses
        // side is ready for migration
        try {
    AppCoordinatorCallback coord = (AppCoordinatorCallback)
      HandleResolver.resolveHandle(coordinatorHandle,
                 AppCoordinatorCallback.class.getName());
    coord.migrationApproval(providesComponentName,
          getComponentID().getInstanceName(),
          usingPortName,
          AppCoordinatorCallback.READY);
        } catch (gov.cca.CCAException ce) {
    logger.severe("Can't invoke notification on remote AppCoordinator",
            ce);
        }
      }
    } else {
      logger.severe("Port " + usingPortName + " not defined");

      // callback the AppCoordinator with an exception
      try {
        AppCoordinatorCallback coord = (AppCoordinatorCallback)
    HandleResolver.resolveHandle(coordinatorHandle,
               AppCoordinatorCallback.class.getName());
        coord.migrationApproval(providesComponentName,
              getComponentID().getInstanceName(),
              usingPortName,
              AppCoordinatorCallback.EXCEPTION);
      } catch (gov.cca.CCAException ce) {
        logger.severe("Can't invoke notification on remote AppCoordinator",
View Full Code Here

Examples of intf.mobile.coordinator.AppCoordinatorCallback

  try {
    mStatus.wait();
  } catch (Exception e) {
    logger.severe("Caught exception while waiting on mStatus", e);
    // Send a notification to the AppCoordinator that an exception was caught
    AppCoordinatorCallback coord = (AppCoordinatorCallback)
      HandleResolver.resolveHandle(coordinatorHandle,
           AppCoordinatorCallback.class.getName());
    coord.componentFrozen(getComponentID().getInstanceName(),
        AppCoordinatorCallback.EXCEPTION);
    throw new UnexpectedException("Caught exception while waiting on mStatus", e);
  }
      } else {
  // set that the component is frozen
  mStatus.setIsFrozen(true)
      }

      // unset the freeze requested flag
      mStatus.setFreezeRequested(false);
    }

    // Send a notification to the AppCoordinator that the component is frozen
    AppCoordinatorCallback coord = (AppCoordinatorCallback)
      HandleResolver.resolveHandle(coordinatorHandle,
           AppCoordinatorCallback.class.getName());
    coord.componentFrozen(getComponentID().getInstanceName(),
        AppCoordinatorCallback.FROZEN);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.