Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » cluster » tcp » [javadoc | source]
    1   /*
    2    * Copyright 1999,2004 The Apache Software Foundation.
    3    * 
    4    * Licensed under the Apache License, Version 2.0 (the "License");
    5    * you may not use this file except in compliance with the License.
    6    * You may obtain a copy of the License at
    7    * 
    8    *      http://www.apache.org/licenses/LICENSE-2.0
    9    * 
   10    * Unless required by applicable law or agreed to in writing, software
   11    * distributed under the License is distributed on an "AS IS" BASIS,
   12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   13    * See the License for the specific language governing permissions and
   14    * limitations under the License.
   15    */
   16   
   17   package org.apache.catalina.cluster.tcp;
   18   
   19   import java.net.InetAddress;
   20   
   21   /**
   22    * Send cluster messages sync to request with only one socket.
   23    * 
   24    * @author Filip Hanik
   25    * @author Peter Rossbach
   26    * @version 1.2
   27    */
   28   
   29   public class SocketSender extends DataSender {
   30       // ----------------------------------------------------- Instance Variables
   31   
   32       /**
   33        * The descriptive information about this implementation.
   34        */
   35       private static final String info = "SocketSender/1.2";
   36   
   37       // ------------------------------------------------------------- Constructor
   38      
   39      /**
   40       * @param domain replication cluster domain (session domain)
   41       * @param host replication node tcp address
   42       * @param port replication node tcp port
   43       */
   44       public SocketSender(String domain,InetAddress host, int port) {
   45           super(domain,host, port);
   46       }
   47   
   48       // ------------------------------------------------------------- Properties
   49   
   50       /**
   51        * Return descriptive information about this implementation and the
   52        * corresponding version number, in the format
   53        * <code>&lt;description&gt;/&lt;version&gt;</code>.
   54        */
   55       public String getInfo() {
   56   
   57           return (info);
   58   
   59       }
   60   
   61       public String toString() {
   62           StringBuffer buf = new StringBuffer("SocketSender[");
   63           buf.append(getAddress()).append(":").append(getPort()).append("]");
   64           return buf.toString();
   65       }
   66   
   67   }

Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » cluster » tcp » [javadoc | source]