Examples of Application


Examples of org.lightfish.business.servermonitoring.entity.Application

    }

    @Override
    public DataPoint<Application> collect() throws Exception {
        String[] components = getStringArray(APPLICATIONS + "/" + applicationName, "childResources");
        Application app = new Application(applicationName, Arrays.asList(components));
        return new DataPoint<>(getApplicationName(), app);
    }
View Full Code Here

Examples of org.mule.module.launcher.application.Application

        assertTrue("Deployer never invoked", deployLatch.await(LATCH_TIMEOUT, TimeUnit.MILLISECONDS));

        assertAppsDir(NONE, new String[] {"priviledged-dummy-app"}, true);

        final Application app = findApp("priviledged-dummy-app", 1);
        // now that we're sure it's the app we wanted, assert the registry has everything
        // a 'privileged' app would have had
        final Object obj = app.getMuleContext().getRegistry().lookupObject(PriviledgedMuleApplication.REGISTRY_KEY_DEPLOYMENT_SERVICE);
        assertNotNull("Privileged objects have not been registered", obj);
        assertTrue(((ApplicationWrapper) app).getDelegate() instanceof PriviledgedMuleApplication);
    }
View Full Code Here

Examples of org.nfctools.mf.mad.Application

    if (lastReadRecords != null) {
      return lastReadRecords;
    }
    else {
      try {
        Application application = getApplication();
        // TODO create TagInputStream for better performance
        byte[] tlvWrappedNdefMessage = application.read(new KeyValue(Key.A, MfConstants.NDEF_KEY));
        if (log.isDebugEnabled())
          log.debug(NfcUtils.convertBinToASCII(tlvWrappedNdefMessage));
        TypeLengthValueReader reader = new TypeLengthValueReader(
            new ByteArrayInputStream(tlvWrappedNdefMessage));
        convertRecords(reader);
View Full Code Here

Examples of org.openquark.cal.compiler.SourceModel.Expr.Application

            boolean isRedundant = false;

            Expr lambdaExp = getExprWithoutParen(lambda.getDefiningExpr());
           
            if(lambdaExp instanceof Application) {
                Application definingExpr = (Application)lambdaExp;
                isRedundant = (definingExpr.getNExpressions() >= lambda.getNParameters() + 1);
               
                // Walk backwards along the parameters so that we catch cases like
                // (\x -> map add x)
                int i = lambda.getNParameters() - 1;
                int j = definingExpr.getNExpressions() - 1;
                for(;isRedundant && i >= 0 && j >= 1;i--, j--) {
                   
                    if(!isParameterVar(lambda.getNthParameter(i), definingExpr.getNthExpression(j))) {
                        isRedundant = false;
                    }
                }
               
            } else if(lambdaExp instanceof BinaryOp) {
                BinaryOp definingExpr = (BinaryOp)lambdaExp;
               
                if(lambda.getNParameters() == 2 &&
                   isParameterVar(lambda.getNthParameter(0), definingExpr.getLeftExpr()) &&
                   isParameterVar(lambda.getNthParameter(1), definingExpr.getRightExpr())) {
                   
                    isRedundant = true;
                   
                } else if(lambda.getNParameters() == 1 &&
                   isParameterVar(lambda.getNthParameter(0), definingExpr.getRightExpr()) &&
                   !containsParameterReference(lambda.getNthParameter(0), definingExpr.getLeftExpr())) {
                   
                    isRedundant = true;
                }
           
            } else if(lambdaExp instanceof UnaryOp) {
                UnaryOp definingExpr = (UnaryOp)lambdaExp;
                if(lambda.getNParameters() == 1 &&
                   isParameterVar(lambda.getNthParameter(0), definingExpr.getExpr())) {
                   
                    isRedundant = true;
                }
            }
           
View Full Code Here

Examples of org.qi4j.api.structure.Application

    @Ignore( "Must fix the TODOs below." )
    public void testPlugins()
        throws Exception
    {
        Energy4Java runtime = new Energy4Java();
        Application app = runtime.newApplication( new MainApplicationAssembler() );
        app.activate();
    }
View Full Code Here

Examples of org.restlet.Application

     *
     * @return The newly created Application or null if unable to create
     */
    @SuppressWarnings("unchecked")
    protected Application createApplication(Context parentContext) {
        Application application = null;

        // Try to instantiate a new target application
        // First, find the application class name
        final String applicationClassName = getInitParameter(APPLICATION_KEY,
                null);

        // Load the application class using the given class name
        if (applicationClassName != null) {
            try {
                final Class<?> targetClass = loadClass(applicationClassName);

                try {
                    // Instantiate an application with the default constructor
                    // then invoke the setContext method.
                    application = (Application) targetClass.getConstructor()
                            .newInstance();

                    // Set the context based on the Servlet's context
                    application.setContext(new ServletContextAdapter(this,
                            parentContext));
                } catch (NoSuchMethodException e) {
                    log("[Noelios Restlet Engine] - The ServerServlet couldn't invoke the constructor of the target class. Please check this class has a constructor without parameter. The constructor with a parameter of type Context will be used instead.");
                    // The constructor with the Context parameter does not
                    // exist. Create a new instance of the application class by
                    // invoking the constructor with the Context parameter.
                    application = (Application) targetClass.getConstructor(
                            Context.class).newInstance(
                            new ServletContextAdapter(this, parentContext));
                }
            } catch (ClassNotFoundException e) {
                log(
                        "[Noelios Restlet Engine] - The ServerServlet couldn't find the target class. Please check that your classpath includes "
                                + applicationClassName, e);

            } catch (InstantiationException e) {
                log(
                        "[Noelios Restlet Engine] - The ServerServlet couldn't instantiate the target class. Please check this class has an empty constructor "
                                + applicationClassName, e);
            } catch (IllegalAccessException e) {
                log(
                        "[Noelios Restlet Engine] - The ServerServlet couldn't instantiate the target class. Please check that you have to proper access rights to "
                                + applicationClassName, e);
            } catch (NoSuchMethodException e) {
                log(
                        "[Noelios Restlet Engine] - The ServerServlet couldn't invoke the constructor of the target class. Please check this class has a constructor with a single parameter of Context "
                                + applicationClassName, e);
            } catch (InvocationTargetException e) {
                log(
                        "[Noelios Restlet Engine] - The ServerServlet couldn't instantiate the target class. An exception was thrown while creating "
                                + applicationClassName, e);
            }
        }

        if (application != null) {
            final Context applicationContext = application.getContext();

            // Copy all the servlet parameters into the context
            String initParam;

            // Copy all the Servlet component initialization parameters
View Full Code Here

Examples of org.restlet.example.ext.rdf.foaf.Application

     * all HTML representations.
     *
     * @return the Freemarker's configuration object.
     */
    private Configuration getFmcConfiguration() {
        final Application application = (Application) getApplication();
        return application.getFmc();
    }
View Full Code Here

Examples of org.sentinel.servers.http.configuration.Application

   
    @Test
    public void testInvalidRunApplication()
    {
        try {
            Application app = new Application();
            app.setApplication(Integer.class);

            Protocol protocol = new Protocol();
            protocol.runApplication(null, app, null);
        }
        catch(SentinelException ex) {
View Full Code Here

Examples of org.simplericity.macify.eawt.Application

      System.out.println("Not enough arguments.");
      System.exit(-1);
    }
   
    // Set the OSX application icon first, if we are on OSX.
    Application application = new DefaultApplication();
    if(application.isMac())
    {
      try
      {
        BufferedImage image = ImageIO.read(new File("icon.png"));
        application.setApplicationIconImage(image);
      }
      catch (IOException e)
      {
        e.printStackTrace();
      }
View Full Code Here

Examples of org.springframework.erlang.core.Application

      for (OtpErlangObject appDescription : appList) {
        OtpErlangTuple appDescriptionTuple = (OtpErlangTuple) appDescription;
        String name = appDescriptionTuple.elementAt(0).toString();
        String description = appDescriptionTuple.elementAt(1).toString();
        String version = appDescriptionTuple.elementAt(2).toString();
        applications.add(new Application(name, description, version));
      }
    }
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.