Examples of ApplicationManager


Examples of bm.core.ApplicationManager

                }
                lastKey.setTime( System.currentTimeMillis() );
            }
            if( keyCount > 3 )
            {
                final ApplicationManager manager = Application.getManager();
                if( manager != null )
                {
                    View view = manager.getBestView();
                    if( view != null )
                    {
                        try
                        {
                            view.show();
                        }
                        catch( Exception e )
                        {
                            view = null;
                        }
                    }
                    if( view == null )
                    {
                        view = manager.getMainView();
                        if( view != null )
                        {
                            try
                            {
                                view.show();
                            }
                            catch( Exception e )
                            {
                                view = null;
                            }
                        }
                    }
                    if( view == null )
                    {
                        manager.exitApplication();
                    }
                }
                else
                {
                    System.exit( 1 );
View Full Code Here

Examples of co.cask.cdap.test.ApplicationManager

public class HelloWorldTest extends TestBase {

  @Test
  public void test() throws TimeoutException, InterruptedException, IOException {
    // Deploy the HelloWorld application
    ApplicationManager appManager = deployApplication(HelloWorld.class);

    // Start WhoFlow
    FlowManager flowManager = appManager.startFlow("WhoFlow");

    // Send stream events to the "who" Stream
    StreamWriter streamWriter = appManager.getStreamWriter("who");
    streamWriter.send("1");
    streamWriter.send("2");
    streamWriter.send("3");
    streamWriter.send("4");
    streamWriter.send("5");

    try {
      // Wait for the last Flowlet processing 5 events, or at most 5 seconds
      RuntimeMetrics metrics = RuntimeStats.getFlowletMetrics("HelloWorld", "WhoFlow", "saver");
      metrics.waitForProcessed(5, 5, TimeUnit.SECONDS);
    } finally {
      flowManager.stop();
    }

    // Start Greeting procedure and query
    ProcedureManager procedureManager = appManager.startProcedure("Greeting");
    String response = procedureManager.getClient().query("greet", ImmutableMap.<String, String>of());
    Assert.assertEquals("\"Hello 5!\"", response);

    appManager.stopAll();
  }
View Full Code Here

Examples of com.adito.agent.client.applications.ApplicationManager

           * here unless they are active. This simplifies the agent by
           * making it respond to start and stop requests from the new
           * persistent connection with Adito.
           */
          tunnelManager = new TunnelManager(this);
          applicationManager = new ApplicationManager(this);
          webForwardManager = new WebForwardManager(this);
          networkPlaceManager = new NetworkPlaceManager(this);
          updateResources(-1);
          return;
        } else if (response.getStatus() == 401) {
View Full Code Here

Examples of com.sun.enterprise.server.ApplicationManager

        {
            try{
           
                if(type.equals(AutoDeployConstants.EAR_EXTENSION)) {
               
                    ApplicationManager amgr =
                                ManagerFactory.getApplicationManager();
                    return amgr.isRegistered(name);
                   
                }else if(type.equals(AutoDeployConstants.JAR_EXTENSION)) {
               
                    StandAloneEJBModulesManager emgr =
                                ManagerFactory.getSAEJBModulesManager();
View Full Code Here

Examples of evolaris.framework.sys.business.ApplicationManager

    Object destinationApplicationIdFromSession = req.getSession().getAttribute("destinationApplicationId");
    if (destinationApplicationIdFromSession != null){
      if (!(destinationApplicationIdFromSession instanceof Long)){
        throw new BugException("invalid destinationApplicationId parameter: " + destinationApplicationIdFromSession);
      }
      ApplicationManager applicationManager = new ApplicationManager(locale,session);
      destinationApplication = applicationManager.getApplication((Long)destinationApplicationIdFromSession);
      if (destinationApplication == null){
        throw new BugException("invalid destination application id: " + destinationApplicationIdFromSession);
      }
      destinationGroup = destinationApplication.getGroup();
    } else {
View Full Code Here

Examples of evolaris.framework.sys.business.ApplicationManager

   *
   * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    InteractionLogListForm listForm = (InteractionLogListForm)form;
    ApplicationManager applicationManager = new ApplicationManager(locale,session);

    Group groupToDisplay = null;
    Application applicationToDisplay = null;

    groupToDisplay = this.getCurrentGroup(req);
    Long applicationId = listForm.getApplicationId();
    if (applicationId != null && applicationId != -1) {
      Application application = applicationManager.getApplication(applicationId);
      if (application != null && application.getGroup() == groupToDisplay){
        applicationToDisplay = application;
      }
    }

View Full Code Here

Examples of evolaris.framework.sys.business.ApplicationManager

  /**
   * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    Group group = this.getCurrentGroup(req);
    ApplicationManager mgr = new ApplicationManager(locale, session);
    List<Application> apps = mgr.getApplications(group);
    req.setAttribute("applications", apps);
    return mapping.findForward("list");
  }
View Full Code Here

Examples of evolaris.framework.sys.business.ApplicationManager

  public Application createApplication(String name){
    Group group = mgblGroup();
    Application application = new Application();
    application.setGroup(group);
    application.setName(name);
    ApplicationManager applicationManager = new ApplicationManager(locale,session);
    applicationManager.createApplication(application);
   
    session.saveOrUpdate(application);
    return application;
  }
View Full Code Here

Examples of evolaris.framework.sys.business.ApplicationManager

  /**
   * @see evolaris.framework.sys.web.action.EnterEditDuplicateAction#entryFromDatabase(long)
   */
  @Override
  protected Application entryFromDatabase(long id) {
    ApplicationManager applicationManager = new ApplicationManager(locale,session);
    return applicationManager.getApplication(id);
  }
View Full Code Here

Examples of evolaris.framework.sys.business.ApplicationManager

  // retrieves application from group and application  ID in form; returns a reasonable proposal if none available; throws exception if insufficient access rights
  // also sets session attribute "applications" with applications according to group
  // the application ID can be null if no information available or application not used in the JSP
  protected Application applicationPreparation(HttpServletRequest req, Group group, Long applicationId) {
    ApplicationManager applicationManager = new ApplicationManager(locale,session);
    List<Application> applications = applicationManager.getApplications(group);
    Application defaultApplication = group.getDefaultApplication()// may be null
    Application application = new Application();
    application.setId(-1);
    switch (applications.size()) {
    case 0:
      application.setName("(" + getLocalizedMessage("SystemWeb", "sys.noApplicationAvailable") + ")");
      applications.add(application);
      break;
    case 1:
      application = applications.iterator().next();
      break;
    default:
      if (defaultApplication != null){
        application = defaultApplication;
      } else {
        application.setName("(" + getLocalizedMessage("SystemWeb", "sys.noApplicationSelected") + ")");
        applications.add(0,application);
      }
    }
    req.getSession().setAttribute("applications", applications);
   
    if (applicationId != null){
      Application selectedApplication = applicationManager.getApplication(applicationId);
      if (selectedApplication != null && selectedApplication.getGroup() == group){
        application = selectedApplication;
      }
    }
    return application;
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.