Class Server

  • All Implemented Interfaces:
    ParseOutput

    public class Server
    extends Object
    implements ParseOutput
    This class represents a server. This class holds the server name and the port information.
    • Constructor Detail

      • Server

        public Server()
        The constructor to instantiate the server object. The creation interface is only exposed to this package.
    • Method Detail

      • getPort

        public int getPort()
        Get the server's port.
        Returns:
        The port number.
      • getServerName

        public String getServerName()
        The server name, as defined in the xml. The package does not do any fqdn conversion or reverse address lookup.
        Returns:
        the server name.
      • getConnectionType

        public Server.Type getConnectionType()
        Get the type of the connection to the server.
        Returns:
        Server.Type The connection type to the server.
      • getServerID

        public String getServerID()
        The server id that's defined in the configuration file. It is good to keep this server id unique within one service. If the same server configuration repeats in another section, use the same server id.
        Returns:
        the server id
      • process

        public void process​(XMLParser parser,
                            String name,
                            Vector elems,
                            Hashtable atts,
                            String Pcdata)
                     throws XMLException
        This method is an implementation of the interface and must be called only by the XMLParser object. This is my final plea. I'm a process not process which can load information from xml file for you. So stop calling me.
        Specified by:
        process in interface ParseOutput
        name - the name of this node.
        elems - contains all the sub-nodes.
        atts - contains the attributes value of this node
        Pcdata - contains text value of this node
        Throws:
        XMLException
        See Also:
        ParseOutput
      • getActiveStatus

        public boolean getActiveStatus()
        Get the server's active Status
        Returns:
        boolean True, if the server is active; false if otherwise.
      • toString

        public String toString()
        Some toString functions for dump purposes.
        Overrides:
        toString in class Object
        Returns:
        String the string rep.