org.apache.commons.jelly.tags.jetty
Class JettyHttpServerTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.jetty.JettyHttpServerTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class JettyHttpServerTag
extends org.apache.commons.jelly.TagSupport

Declare an instance of a Jetty http server

Version:
$Id: JettyHttpServerTag.java 155420 2005-02-26 13:06:03Z dirkv $
Author:
rtl

Field Summary
static java.lang.String DEFAULT_CONTEXT_PATH
          default context to create context for
static java.lang.String DEFAULT_HOST
          default host to create listeners/context for
static java.lang.String DEFAULT_LOG_FILE
          default log file for Jetty
static int DEFAULT_PORT
          default port to create listeners for
static java.lang.String DEFAULT_RESOURCE_BASE
          default resource base to use for context
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
JettyHttpServerTag()
          Creates a new instance of JettyHttpServerTag
 
Method Summary
 void addContext(org.mortbay.http.HttpContext context)
          Add an http context to the server instance
 void addListener(org.mortbay.http.HttpListener listener)
          Add an http listener to the server instance
 org.mortbay.http.UserRealm addRealm(org.mortbay.http.UserRealm realm)
          Add a user authentication realm to the server instance
 void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
          Perform the tag functionality.
 java.lang.String getLogFileName()
          Getter for property logFileName.
 java.lang.String getVar()
          Getter for property var.
 void setLogFileName(java.lang.String logFileName)
          Setter for property logFileName.
 void setVar(java.lang.String var)
          Setter for property var.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
default port to create listeners for

See Also:
Constant Field Values

DEFAULT_HOST

public static final java.lang.String DEFAULT_HOST
default host to create listeners/context for

See Also:
Constant Field Values

DEFAULT_CONTEXT_PATH

public static final java.lang.String DEFAULT_CONTEXT_PATH
default context to create context for

See Also:
Constant Field Values

DEFAULT_RESOURCE_BASE

public static final java.lang.String DEFAULT_RESOURCE_BASE
default resource base to use for context

See Also:
Constant Field Values

DEFAULT_LOG_FILE

public static final java.lang.String DEFAULT_LOG_FILE
default log file for Jetty

See Also:
Constant Field Values
Constructor Detail

JettyHttpServerTag

public JettyHttpServerTag()
Creates a new instance of JettyHttpServerTag

Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
           throws org.apache.commons.jelly.JellyTagException
Perform the tag functionality. In this case, create an http server after making sure that it has at least one context and associated http handler, creating defaults if it doesn't

Parameters:
xmlOutput - where to send output
Throws:
java.lang.Exception - when an error occurs
org.apache.commons.jelly.JellyTagException

addListener

public void addListener(org.mortbay.http.HttpListener listener)
Add an http listener to the server instance

Parameters:
listener - the listener to add

addContext

public void addContext(org.mortbay.http.HttpContext context)
Add an http context to the server instance

Parameters:
context - the context to add

addRealm

public org.mortbay.http.UserRealm addRealm(org.mortbay.http.UserRealm realm)
Add a user authentication realm to the server instance

Parameters:
realm - the realm to add
Returns:
the realm added

getVar

public java.lang.String getVar()
Getter for property var.

Returns:
Value of property var.

setVar

public void setVar(java.lang.String var)
Setter for property var.

Parameters:
var - New value of property var.

getLogFileName

public java.lang.String getLogFileName()
Getter for property logFileName.

Returns:
Value of property logFileName.

setLogFileName

public void setLogFileName(java.lang.String logFileName)
Setter for property logFileName.

Parameters:
logFileName - New value of property logFileName.


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.