Examples of Agent


Examples of org.jfrog.build.api.Agent

    public void testBuilderSetters() {
        String version = "1.2.0";
        String name = "moo";
        String number = "15";
        BuildType buildType = GRADLE;
        Agent agent = new Agent("pop", "1.6");
        BuildAgent buildAgent = new BuildAgent("rock", "2.6");
        long durationMillis = 6L;
        String principal = "bob";
        String artifactoryPrincipal = "too";
        String url = "mitz";
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.Agent

            try {
                // See if they are a user in the system.
                UserManager.getInstance().getUser(usernameToken);
                usernameToken += ("@" + ComponentManagerFactory.getComponentManager().getServerName());
                JID address = new JID(usernameToken.trim());
                Agent agent;

                if (agentManager.hasAgent(address)) {
                    agent = agentManager.getAgent(address);
                }
                else {
View Full Code Here

Examples of org.mule.api.agent.Agent

     */
    public void initialise() throws InitialisationException
    {
        try
        {
            Agent agent = createRmiAgent();
            final MuleRegistry registry = muleContext.getRegistry();
            if (!isAgentRegistered(agent))
            {
                registry.registerAgent(agent);
            }
View Full Code Here

Examples of org.nlogo.agent.Agent

    }
    if (o1 instanceof String && o2 instanceof String) {
      return (((String) o1).compareTo((String) o2) <= 0);
    }
    if (o1 instanceof Agent && o2 instanceof Agent) {
      Agent a1 = (Agent) o1;
      Agent a2 = (Agent) o2;
      if (a1.getAgentBit() == a2.getAgentBit()) {
        return a1.compareTo(a2) <= 0;
      }
    }
    throw new EngineException(context, this,
        I18N.errorsJ().getN("org.nlogo.prim._lessorequal.cannotCompareParameters",
View Full Code Here

Examples of org.nlogo.api.Agent

    gl.glLoadIdentity();

    synchronized (world) {
      Perspective perspective = world.observer().perspective();
      Agent targetAgent = world.observer().targetAgent();

      worldRenderer.observePerspective(gl);

      worldRenderer.renderCrossHairs(gl);

      lightManager.applyLighting();

      // Uncomment the code below to show the positions and directions of all the lights
      // in the world (only works in NetLogo 3D, not the 3D view in 2D).
      /*
      if (world instanceof World3D)
      {
        double observerDistance = Math.sqrt(world.observer().oxcor() * world.observer().oxcor()
              + world.observer().oycor() * world.observer().oycor()
              + world.observer().ozcor() * world.observer().ozcor());
        lightManager.showLights(glu, (World3D)world, WORLD_SCALE, observerDistance, shapeRenderer);
      }
      */

      renderWorld(gl, world);

      setClippingPlanes(gl);

      // Calculate the line scale to use for rendering outlined turtles and links,
      // as well as link stamps.
      double lineScale = calculateLineScale();

      boolean sortingNeeded = world.mayHavePartiallyTransparentObjects();

      if (!sortingNeeded) {
        worldRenderer.renderPatchShapes
            (gl, outlineAgent, renderer.fontSize(), renderer.patchSize());

        linkRenderer.renderLinks(gl, glu, renderer.fontSize(), renderer.patchSize(), outlineAgent);

        turtleRenderer.renderTurtles(gl, glu, renderer.fontSize(), renderer.patchSize(), outlineAgent);

        // Render stamps and trails
        //
        // Note: in the 3D view in 2D, stamps and trails appear as bitmaps
        // on the drawing layer, which already got rendered in renderWorld().
        //
        // In the true 3D version, we skipped the call to renderDrawing()
        // because there's the possibility that stamps and trails might be
        // transparent, and so they need to get sorted along with the rest
        // of the objects in the scene.
        //
        // However, since we've determined that no sorting is needed in this
        // block, we can safely render the drawing layer now.

        if (world instanceof World3D) {
          worldRenderer.renderDrawing(gl);
        }
      } else {
        // Make sure everything needed for transparency is enabled.
        gl.glEnable(GL.GL_BLEND);
        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);

        opaqueAgents.clear();
        transparentAgents.clear();

        for (Agent agent : world.turtles().agents()) {
          if (agentIsVisible(agent)) {
            if (agent.isPartiallyTransparent()) {
              transparentAgents.add(agent);
            } else {
              opaqueAgents.add(agent);
            }
          }
        }

        for (Agent agent : world.patches().agents()) {
          if (agentIsVisible(agent)) {
            if (agent.isPartiallyTransparent()) {
              transparentAgents.add(agent);
            } else {
              opaqueAgents.add(agent);
            }
          }
        }

        for (Agent agent : world.links().agents()) {
          if (agentIsVisible(agent)) {
            if (agent.isPartiallyTransparent()) {
              transparentAgents.add(agent);
            } else {
              opaqueAgents.add(agent);
            }
          }
        }

        // Now add stamps and trails.
        //
        // Note: in the 3D view in 2D, stamps and trails appear as bitmaps
        // on the drawing layer, which already got rendered in renderWorld().
        // We only have to worry about the true 3D version.

        if (world instanceof World3D) {
          // Link stamps
          for (org.nlogo.api.Link stamp : ((Drawing3D) world.getDrawing()).linkStamps()) {
            if (agentIsVisible(stamp)) {
              if (stamp.isPartiallyTransparent()) {
                transparentAgents.add(stamp);
              } else {
                opaqueAgents.add(stamp);
              }
            }
          }

          // Turtle stamps
          for (org.nlogo.api.Turtle stamp : ((Drawing3D) world.getDrawing()).turtleStamps()) {
            if (agentIsVisible(stamp)) {
              if (stamp.isPartiallyTransparent()) {
                transparentAgents.add(stamp);
              } else {
                opaqueAgents.add(stamp);
              }
            }
          }

          // Turtle trails
          ((WorldRenderer3D) worldRenderer).renderTrails(gl);

          // Note: We are currently not supporting transparent turtle trails
          // (trails are left by the turtles when you use the pen-down command).
          // The difficulty with these is that they are not instances of Agent,
          // so we would have to reimplement our code to use Objects instead,
          // or create some sort of Renderable interface (but this would create
          // more problems because we would need to make Agent implement
          // this Renderable interface, so either we have to create a bad dependency
          // from the org.nlogo.api package to the render package, or else we
          // have to put the Renderable interface in the org.nlogo.api package).
          // There may also be a significant performance issue since the trails
          // consist of a large number of small line segments, all of which would
          // need to be sorted each frame for transparency to work properly.
          //
          // For reference:
          // for( org.nlogo.api.DrawingLine3D line : ( (Drawing3D) world.getDrawing() ).lines() )
          // {
          //     // add trail segment to the list here
          // }
        }

        //    System.out.printf( "\t\t%d opaque objects.\n" , opaqueAgents.size() ) ;
        //    System.out.printf( "\t\t%d transparent objects (sorted).\n" , transparentAgents.size() ) ;

        // Render the opaque objects first
        for (Agent agent : opaqueAgents) {
          renderAgent(gl, agent, lineScale);
        }

        // Now render the transparent agents in sorted order (back to front)
        while (!transparentAgents.isEmpty()) {
          Agent agent = transparentAgents.remove();
          renderAgent(gl, agent, lineScale);
        }

        gl.glDisable(GL.GL_BLEND);
      }
View Full Code Here

Examples of org.rhq.core.domain.resource.Agent

    public static void main(String[] args) throws Exception {
        ExternalizableStrategy.setStrategy(Subsystem.REFLECTIVE_SERIALIZATION);

        // create objects
        Agent writeAgent = new Agent("reflectiveAgent", "reflectiveAddress", 0, "reflectiveEndpoint", "reflectiveToken");

        ResourceType writeResourceType = new ResourceType();
        writeResourceType.setName("reflectiveType");
        writeResourceType.setPlugin("reflectivePlugin");
        writeResourceType.setId(7);

        Resource writeParentResource = new Resource();
        writeParentResource.setId(11);
        writeParentResource.setName("reflectiveParentResource");
        writeParentResource.setResourceKey("reflectiveParentKey");

        Resource writeResource = new Resource();
        writeResource.setId(42);
        writeResource.setName("reflectiveResource");
        writeResource.setResourceKey("reflectiveKey");

        // setup relationships
        writeResource.setAgent(writeAgent);
        writeResource.setResourceType(writeResourceType);
        writeResource.setParentResource(writeParentResource);

        System.out.println("BEFORE");
        System.out.println(writeResource.toString());
        System.out.println("BEFORE");

        String tempDir = System.getProperty("java.io.tmpdir");
        File tempFile = new File(tempDir, "entitySerializerTest.txt");

        FileOutputStream fos = new FileOutputStream(tempFile);
        try {
            ObjectOutput output = new ObjectOutputStream(fos);
            try {
                writeExternalRemote(writeResource, output);
            } finally {
                output.close();
            }
        } finally {
            fos.close();
        }

        Resource readResource = new Resource();
        FileInputStream fis = new FileInputStream(tempFile);
        try {
            ObjectInput ois = new ObjectInputStream(fis);
            try {
                readExternalRemote(readResource, ois);
            } finally {
                ois.close();
            }
        } finally {
            fis.close();
        }

        // quick verification
        System.out.println("AFTER");
        System.out.println(readResource.toString());
        System.out.println("AFTER");

        // deeper verification
        boolean equalsResource = writeResource.equals(readResource);
        boolean equalsParentResource = writeParentResource.equals(readResource.getParentResource());
        boolean equalsResourceType = writeResourceType.equals(readResource.getResourceType());
        boolean equalsAgent = writeAgent.equals(readResource.getAgent());

        System.out.println("equalsResource: " + equalsResource);
        System.out.println("equalsParentResource: " + equalsParentResource);
        System.out.println("equalsResourceType: " + equalsResourceType);
        System.out.println("equalsAgent: " + equalsAgent);
View Full Code Here

Examples of org.simpleframework.transport.trace.Agent

      System.setProperty("sun.security.ssl.allowLegacyHelloMessages", "true");
      File file = new File("C:\\work\\development\\async_http\\yieldbroker-proxy-trading\\etc\\uat.yieldbroker.com.pfx");
      KeyStoreReader reader = new KeyStoreReader(KeyStoreType.PKCS12, file, "p", "p");
      SecureSocketContext context = new SecureSocketContext(reader, SecureProtocol.TLS);
      SSLContext sslContext = context.getContext();
      Agent agent = new MockAgent();
      TransportProcessor processor = new TransportProcessor();
      ProcessorServer server = new ProcessorServer(processor);
      ConfigurableCertificateServer certServer = new ConfigurableCertificateServer(server);
      SocketConnection con = new SocketConnection(certServer, agent);
      SocketAddress serverAddress = new InetSocketAddress(listenPort);
View Full Code Here

Examples of org.springframework.hateoas.client.Agent

    return browser;
  }

  private static void getProductsOfPerson(Browser browser, int personId) throws GoalNotFoundException {

    Agent agent = new Agent(browser);

    // order of follow rel actions is significant
    agent.addFollowRelAction(new FollowRelAction("search"));
    agent.addFollowRelAction(new FollowRelAction("products"));

    // enable client to submit form when encountered
    agent.addSubmitFormAction(new SubmitFormAction("searchPerson", Args.of("personId", personId)));

    agent.setGoal(describedBy("http://example.com/doc#product").within(describedBy("http://example.com/doc#customer")));
    Browsable result = agent.browseForGoal();

    System.out.println("\n--- result ---");
    System.out.println(result.toString());
    System.out.println("--------------\n");
  }
View Full Code Here

Examples of org.timerescue.element.agent.Agent

   */
  public void run() {
    // TODO Auto-generated method stub
    //See what all agents are up to
    for (Iterator<Agent> iterator = agents.iterator(); iterator.hasNext();) {
      Agent agent =  iterator.next();
      //Sets environment information for all Agents
      //TODO Change the default neighbor radio for the distance perception of the agent     
      sendParametersToAgent(
          getSorroundings(
            agent.getCoordinate(),
            Coordinate.Constants.DEFAULT_NEIGHBOR_RADIO), agent);
      //Ask the agent what to do
      Action action = agent.decide();
      //Executes the action
      executeAction(action);
     
    }

View Full Code Here

Examples of org.wso2.carbon.databridge.agent.thrift.Agent

        String adminPassword = FasterLookUpDataHolder.getInstance().getBamPassword();

        System.setProperty("javax.net.ssl.trustStore", trustStorePath);
        System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);

        Agent agent = new Agent(agentConfiguration);

        try {
            dataPublisher = new DataPublisher(bamServerUrl, adminUsername, adminPassword, agent);
            FasterLookUpDataHolder.getInstance().setDataPublisher(dataPublisher);
           
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.