costin      2002/06/05 14:22:40

  Modified:    jk/java/org/apache/jk/common ChannelSocket.java
  Log:
  Added some comments :-)
  
  ( no, they don't do anything yet )
  
  Revision  Changes    Path
  1.15      +26 -1     
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java
  
  Index: ChannelSocket.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelSocket.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ChannelSocket.java        22 May 2002 23:51:11 -0000      1.14
  +++ ChannelSocket.java        5 Jun 2002 21:22:40 -0000       1.15
  @@ -93,6 +93,8 @@
   /** Accept ( and send ) TCP messages.
    *
    * @author Costin Manolache
  + * @jmx:mbean name="jk2:service=ChannelSocket"
  + *            description="Accept socket connections"
    */
   public class ChannelSocket extends JkHandler {
       private static org.apache.commons.logging.Log log=
  @@ -118,6 +120,12 @@
   
       /* ==================== Tcp socket options ==================== */
   
  +    /**
  +     * @jmx:managed-constructor description="default constructor"
  +     */
  +    public ChannelSocket() {
  +    }
  +    
       public ThreadPool getThreadPool() {
           return tp;
       }
  @@ -128,6 +136,8 @@
        *  used. We'll also provide the 'difference' to the main coyote
        *  handler - that will be our 'sessionID' and the position in
        *  the scoreboard and the suffix for the unix domain socket.
  +     *
  +     * @jmx:managed-attribute description="Port to listen" access="READ_WRITE"
        */
       public void setPort( int port ) {
           this.startPort=port;
  @@ -135,10 +145,17 @@
           this.maxPort=port+10;
       }
   
  +    public int getPort() {
  +        return port;
  +    }
  +
       public void setAddress(InetAddress inet) {
           this.inet=inet;
       }
   
  +    /**
  +     * @jmx:managed-attribute description="Bind on a specified address" 
access="READ_WRITE"
  +     */
       public void setAddress(String inet) {
           try {
               this.inet= InetAddress.getByName( inet );
  @@ -147,6 +164,12 @@
           }
       }
   
  +    public String getAddress() {
  +        if( inet!=null)
  +            return inet.toString();
  +        return null;
  +    }
  +
       /**
        * Sets the timeout in ms of the server sockets created by this
        * server. This method allows the developer to make servers
  @@ -206,6 +229,9 @@
           ep.setNote( osNote, os );
       }
   
  +    /**
  +     * @jmx:managed-operation
  +     */
       public void init() throws IOException {
           // Find a port.
           if( maxPort<startPort) maxPort=startPort;
  @@ -462,7 +488,6 @@
               }
           }
       }
  -
   
       public int invoke( Msg msg, MsgContext ep ) throws IOException {
           int type=ep.getType();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to