org.apache.commons.modeler.demo
Class Service

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

public class Service
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

Field Summary
 Container container
          The associated Container for this Service.
 
Constructor Summary
Service()
          Construct a default instance of this class.
Service(java.lang.String name, Server server)
          Construct a configured instance of this class.
 
Method Summary
 void addConnector(Connector connector)
          Add a new Connector to this Service.
 Connector findConnector(int port)
          Find and return the specified Connector associated with this Service.
 Connector[] findConnectors()
          Find and return all Connectors associated with this Service.
 Container getContainer()
           
 java.lang.String getName()
           
 Server getServer()
           
 void removeConnector(Connector connector)
          Remove the specified Connector from association with this Service.
 void setContainer(Container container)
           
 void setName(java.lang.String name)
           
 void setServer(Server server)
           
 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
 

Field Detail

container

public Container container
The associated Container for this Service.

Constructor Detail

Service

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


Service

public Service(java.lang.String name,
               Server server)
Construct a configured instance of this class.

Parameters:
name - Name of this service
server - Associated server
Method Detail

getContainer

public Container getContainer()

setContainer

public void setContainer(Container container)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getServer

public Server getServer()

setServer

public void setServer(Server server)

addConnector

public void addConnector(Connector connector)
Add a new Connector to this Service.

Parameters:
connector - The connector to be added

findConnector

public Connector findConnector(int port)
Find and return the specified Connector associated with this Service.

Parameters:
port - Port number of the requested connector

findConnectors

public Connector[] findConnectors()
Find and return all Connectors associated with this Service.


removeConnector

public void removeConnector(Connector connector)
Remove the specified Connector from association with this Service.

Parameters:
connector - The Connector 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.