Package de.iritgo.aktera.comm

Examples of de.iritgo.aktera.comm.ModelRequestMessage


  /**
   * @see java.lang.Runnable#run()
   */
  public void run()
  {
    KeelRequest dsreq = new ModelRequestMessage();

    if (! isInitialized())
    {
      try
      {
        keelContainer = getContainer();
        getLogger().info("Started");

        //        String mto = System.getProperty ("model.timeout");
        //
        //        if (mto != null)
        //        {
        //          try
        //          {
        //            int newTimeOut = new Integer(mto).intValue ();
        //            timeout = newTimeOut;
        //          }
        //          catch (Exception e)
        //          {
        //            getLogger ().warn ("Unable to set model timeout to '" + mto + "'");
        //          }
        //        }

        //        int initPoolSize = 1;
        //        int minPoolSize = 1;
        //        int maxPoolSize = Integer.MAX_VALUE;
        //        int keepAliveTime = 60 * 1000;
        //
        //        try
        //        {
        //          minPoolSize = Integer.parseInt (
        //              System.getProperty ("keel.processor.threads.min"));
        //        }
        //        catch (NumberFormatException x)
        //        {
        //        }
        //
        //        try
        //        {
        //          maxPoolSize = Integer.parseInt (
        //              System.getProperty ("keel.processor.threads.max"));
        //        }
        //        catch (NumberFormatException x)
        //        {
        //        }
        //
        //        try
        //        {
        //          initPoolSize = Integer.parseInt (
        //              System.getProperty ("keel.processor.threads.init"));
        //        }
        //        catch (NumberFormatException x)
        //        {
        //        }

        //        pool = new ThreadPoolExecutor(
        //            minPoolSize, maxPoolSize, keepAliveTime, TimeUnit.MILLISECONDS,
        //            new SynchronousQueue());
      }
      catch (Exception ee)
      {
        getLogger().error("Startup error:", ee);
        heldError = ee;
        throw new RuntimeException(LOG_PREFIX + "Startup Error", ee);
      }
    }

    while (keepRunningKeelDirectServer)
    {
      KeelRequest request;

      try
      {
        //There's only one thread taking objects off the requestQueue, so this doesn't need to be synced
        byte[] requestBytes = (byte[]) requestChannel.take();

        LinkedBlockingQueue replyChannel = (LinkedBlockingQueue) requestChannel.take();

        if (keepRunningKeelDirectServer == false)
        {
          continue;
        }

        request = dsreq.deserialize(requestBytes);

        //        MultiThreadedProcessor processor =
        //          new MultiThreadedProcessor(request, replyChannel);

        //        pool.execute (processor);
View Full Code Here


  {
    try
    {
      this.keepRunningKeelDirectServer = false;

      KeelRequest message = new ModelRequestMessage();

      /**
       * Put an empty message on the queue to causes the "infinite" loop to stop.
       */
      byte[] requestBytes = message.serialize();

      requestChannel.put(requestBytes);

      LinkedBlockingQueue replyChannel = new LinkedBlockingQueue();

View Full Code Here

    return args;
  }

  public boolean allowed(String resource, String operation)
  {
    KeelRequest keelRequest = new ModelRequestMessage();

    keelRequest.setModel("security.authorization");
    keelRequest.setAttribute("sessionid", hreq.getSession().getId());
    keelRequest.setParameter("component", resource);

    if (operation != null)
    {
      keelRequest.setParameter("operation", operation);
    }

    try
    {
      KeelResponse kres = execute();
View Full Code Here

    return configDir.getCanonicalPath();
  }

  public static boolean allowed(HttpSession session, String resource, String operation)
  {
    KeelRequest keelRequest = new ModelRequestMessage();

    keelRequest.setModel("security.authorization");
    keelRequest.setAttribute("sessionid", session.getId());
    keelRequest.setParameter("component", resource);

    if (operation != null)
    {
      keelRequest.setParameter("operation", operation);
    }

    try
    {
      KeelResponse response = getClient(session).execute(keelRequest);
View Full Code Here

    return oneParamName;
  }

  protected KeelRequest createRequest()
  {
    KeelRequest kreq = new ModelRequestMessage();

    return kreq;
  }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.comm.ModelRequestMessage

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.