org.apache.commons.modeler.demo
Class Server

java.lang.Object
  extended by org.apache.commons.modeler.demo.Server

public class Server
extends java.lang.Object

Sample managed object for the Modeler Demonstration Application, based on the Catalina architecture of Tomcat 4.

Version:
$Revision: 480402 $ $Date: 2006-11-29 04:43:23 +0000 (Wed, 29 Nov 2006) $
Author:
Craig R. McClanahan

Constructor Summary
Server()
          Construct a default instance of this class.
Server(int port, java.lang.String shutdown)
          Construct a configured instance of this class.
 
Method Summary
 void addService(Service service)
          Add a new Service to this Server.
 Service findService(java.lang.String name)
          Find and return the specified Service associated with this Server.
 Service[] findServices()
          Find and return all Services associated with this Server.
 int getPort()
           
 java.lang.String getShutdown()
           
 void removeService(Service service)
          Remove the specified Service from association with this Server.
 void setPort(int port)
           
 void setShutdown(java.lang.String shutdown)
           
 java.lang.String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Server

public Server()
Construct a default instance of this class.


Server

public Server(int port,
              java.lang.String shutdown)
Construct a configured instance of this class.

Parameters:
port - Port number of this server
shutdown - Shutdown command of this server
Method Detail

getPort

public int getPort()

setPort

public void setPort(int port)

getShutdown

public java.lang.String getShutdown()

setShutdown

public void setShutdown(java.lang.String shutdown)

addService

public void addService(Service service)
Add a new Service to this Server.

Parameters:
service - The service to be added

findService

public Service findService(java.lang.String name)
Find and return the specified Service associated with this Server.

Parameters:
name - Name of the requested service

findServices

public Service[] findServices()
Find and return all Services associated with this Server.


removeService

public void removeService(Service service)
Remove the specified Service from association with this Server.

Parameters:
service - The Service to be removed

toString

public java.lang.String toString()
Return a String representation of this object.

Overrides:
toString in class java.lang.Object


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.