com.cometway.httpd
Class WebServerExtension

java.lang.Object
  extended by com.cometway.props.Props
      extended by com.cometway.ak.Agent
          extended by com.cometway.ak.ServiceAgent
              extended by com.cometway.httpd.WebServerExtension
All Implemented Interfaces:
AgentInterface, HasStateMachineModel
Direct Known Subclasses:
HTTPAccessRestriction, HTTPAuthenticationAgent, HTTPcgi, HTTPFileServerAgent, HTTPPathRewrite, HTTPProxyAgent, HTTPPutAgent, HTTPRedirectAgent, HTTPSetProperty

public abstract class WebServerExtension
extends ServiceAgent

Abstract class representing an extension for the com.cometway.httpd.WebServer class. This class needs to set a 'domains' property and a 'webserver_service_name' property. It also needs a 'service_name'. The order which extensions are applied is determined by the 'agent_id'. The 'domains' property is a comma separated list of domain names that this extension applies to. If the property is 'all', then all domains are applicable, if it is set to 'default' then the default domain (for example, no multihoming) is used. If a PropsListServiceManager is used, the 'webserver_service_name' and 'domains' does not need to be set, however, the domain and port needs to be in the service_name. for example: 'extension://www.domain.com:80'. However, lists of domains, 'all' and 'default' can no longer be used, but the service_name can be a regular expression that can encompass domains/ports that match the pattern, for example: 'extension://.*domain.com:[0-9]*'.


Field Summary
 
Fields inherited from class com.cometway.ak.Agent
agent_id, agentController, CREATING_STATE, debugReporter, DESTROYED_STATE, DESTROYING_STATE, errorReporter, FAILED_STATE, printlnReporter, props, RUNNING_STATE, STARTING_STATE, STOPPED_STATE, STOPPING_STATE, warningReporter
 
Constructor Summary
WebServerExtension()
           
 
Method Summary
 boolean handleRequest(HTTPAgentRequest request)
          This will be called by the WebServer (specifically the ConnectionKMethod) to handle an HTTPAgentRequest.
 void start()
          This method inherited from com.cometway.ak.ServiceAgent includes functionality to register itself with the WebServer (temporary).
 
Methods inherited from class com.cometway.ak.ServiceAgent
stop
 
Methods inherited from class com.cometway.ak.Agent
currentStateEquals, debug, destroy, error, error, getAgentController, getDateTimeStr, getProps, getServiceImpl, getStateMachineModel, initProps, println, register, registerService, setAgentController, setProps, toString, unregister, unregisterService, warning, warning
 
Methods inherited from class com.cometway.props.Props
addListener, append, copy, copyFrom, copyTo, decrementInteger, dump, enableListeners, enumerateKeys, format, getBoolean, getByteArray, getCharacter, getDate, getDate, getDateString, getDouble, getFloat, getHexString, getInteger, getKeys, getLong, getNextKey, getProperty, getProperty, getPropsContainer, getSize, getString, getString, getTokens, getTokens, getTrimmedString, getVector, hasProperty, incrementInteger, insertProps, loadProps, notifyPropsChanged, notifyPropsChangedIgnore, notifyPropsChangedIgnore, parse, propertyMatchesRegEx, readFromFile, regExPropertyMatches, removeAll, removeListener, removeProperty, resumeNotify, saveProps, set, setBoolean, setCharacter, setDefault, setDouble, setFloat, setInteger, setLong, setProperty, setProperty, setProperty, setPropsContainer, suspendNotify, writeToFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebServerExtension

public WebServerExtension()
Method Detail

start

public void start()
This method inherited from com.cometway.ak.ServiceAgent includes functionality to register itself with the WebServer (temporary).

Specified by:
start in interface AgentInterface
Overrides:
start in class ServiceAgent

handleRequest

public boolean handleRequest(HTTPAgentRequest request)
This will be called by the WebServer (specifically the ConnectionKMethod) to handle an HTTPAgentRequest. If the request has been handled, true is returned and no other WebServerExtensions will be used.