content: /*
   * Copyright (c) 2001 Boulder Real Time Technologies, Inc.
   * All rights reserved
   *
   * This software may be used freely in any way as long as
   * the copyright statement above is not removed.
   *
   * com.brtt.antelope.OrbClient.java
   *
   * Created on February 23, 2001, 3:49 PM
   */
  
  package com.brtt.antelope;
  
  /**
   * This class represents the status of a single Antelope orbserver-client 
   * connection.
   *
   * @author  Danny Harvey, BRTT
   * @version 1.0
   */
  public class OrbClient extends Object {
      
      /**
       * Holds the epoch time when the client status was retrieved
       */
      public double whenTime;
      
      /**
       * Holds the epoch time of the last packet read and/or written by this client.
       */
      public double lastpktTime;
      
      /**
       * Holds the epoch time when this client initiated the orbserver connection.
       */
      public double started;
      
      /**
       * Holds the total number of bytes read and/or written by this client.
       */
      public int bytesTransferred;
      
      /**
       * Holds the total number of packets read and/or written by this client.
       */
      public int packetsTransferred;
      
      /**
       * Holds the current pktid of the orbserver read pointer for this client.
       */
      public int currentPktid;
      
      /**
       * Holds the orbserver port number for this client.
       */
      public int port;
      
      /**
       * Holds the ip-address of this client.
       */
      public byte[] address = new byte[4];
      
      /**
       * Holds the thread id used by the orbserver to service this client.
       */
      public int thread;
      
      /**
       * Holds the file descriptor used by the orbserver to service this client.
       */
      public int fd;
      
      /**
       * Holds the priority used by the orbserver to service this client.
       */
      public int priority;
      
      /**
       * Holds the last ORB request processed by the orbserver for this client.
       */
      public int lastRequest;
      
      public int messages;
          
      /**
       * Holds the total number of ORB requests processed by the orbserver for this client.
       */
      public int nrequests;
          
      /**
       * Holds the total number of write operations by the orbserver to this client.
       */
      public int nwrites;
          
      /**
       * Holds the total number of read operations by the orbserver from this client.
       */
      public int nreads;
          
      /**
       * Holds the total number of bytes read by the orbserver from this client.
       */
      public int bytesRead;
          
      /**
       * Holds the total number of bytes written by the orbserver to this client.
       */
      public int bytesWritten;
          
      /**
       * Holds the total number of orbserver errors generated by this client.
       */
      public int errors;
          
      /**
       * Holds the process id of this client.
       */
      public int pid;
          
      /**
       * Holds the permission string used for this client-orbserver connection.
       */
      public String permission;
          
      /**
       * Holds the command that opened this client-orbserver connection.
       */
      public String what;
          
      /**
       * Holds the hostname that opened this client-orbserver connection.
       */
      public String host;
          
      /**
       * Holds the user name that opened this client-orbserver connection.
       */
      public String who;
          
      /**
       * Holds the current select string for this client-orbserver connection.
       */
      public String select;
          
      /**
       * Holds the current reject string for this client-orbserver connection.
       */
      public String reject;
          
      /** Constructors */
      
      /**
       * Creates a new OrbClient object.
       **/
      public OrbClient() {
      }
            
      /** Public Methods */
      
      /**
       * This gets a string description of the Antelope orbserver-client status.
       * @return A string suitable for display with the client status.
       */
      public String getList () {
          String s =    what + "\n"
                      + "    " + host + ", " + Stock.ipString(address) + ":" + port + "(" + who + ")\n"
                      + "    select = " + select + ", reject = " + reject + "\n"
                      + "    bytesRead = " + bytesRead + ", bytesWritten = " + bytesWritten + "\n"
                      ;
          
          return (s);
      }
     
  }
  