org.apache.commons.jelly.tags.http
Class MethodSupportTag

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.apache.commons.jelly.tags.http.MethodSupportTag
All Implemented Interfaces:
Tag
Direct Known Subclasses:
DeleteTag, GetTag, PostTag, PutTag

public abstract class MethodSupportTag
extends TagSupport

Abstract base class for a tag which invokes a HTTP method

Version:
$Revision: 1.1 $
Author:
James Strachan

Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
MethodSupportTag()
           
 
Method Summary
 void addHeader(java.lang.String name, java.lang.String value)
           
protected  org.apache.commons.httpclient.HttpConnection createConnection()
          A Factory method to create a new HTTP connection
 void doTag(XMLOutput output)
          Evaluates this tag after all the tags properties have been initialized.
 org.apache.commons.httpclient.HttpConnection getConnection()
           
 org.apache.commons.httpclient.HttpConnectionManager getConnectionManager()
           
abstract  org.apache.commons.httpclient.HttpMethod getMethod()
           
 org.apache.commons.httpclient.HttpState getState()
           
 java.lang.String getUrl()
           
 void setConnection(org.apache.commons.httpclient.HttpConnection connection)
          Sets the HTTP connection used to perform the HTTP operation
 void setConnectionManager(org.apache.commons.httpclient.HttpConnectionManager connectionManager)
          Sets the HTTP connection factory used to create HTTP connections
 void setUrl(java.lang.String url)
          Sets the URL of this request
 void setVar(java.lang.String var)
          Sets the variable name for the HttpMethod object
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodSupportTag

public MethodSupportTag()
Method Detail

addHeader

public void addHeader(java.lang.String name,
                      java.lang.String value)
               throws org.apache.commons.httpclient.HttpException,
                      java.net.MalformedURLException

doTag

public void doTag(XMLOutput output)
           throws java.lang.Exception
Description copied from interface: Tag
Evaluates this tag after all the tags properties have been initialized.

getMethod

public abstract org.apache.commons.httpclient.HttpMethod getMethod()
                                                            throws org.apache.commons.httpclient.HttpException,
                                                                   java.net.MalformedURLException
Returns:
the HTTP method to invoke

getState

public org.apache.commons.httpclient.HttpState getState()
Returns:
the state of this HTTP request, the cookies used etc

getConnection

public org.apache.commons.httpclient.HttpConnection getConnection()
                                                           throws org.apache.commons.httpclient.HttpException,
                                                                  java.net.MalformedURLException
Returns:
the HTTP connection, creating one if required

setConnection

public void setConnection(org.apache.commons.httpclient.HttpConnection connection)
Sets the HTTP connection used to perform the HTTP operation

getConnectionManager

public org.apache.commons.httpclient.HttpConnectionManager getConnectionManager()
Returns:
the HTTP connection factory, creating one if required

setConnectionManager

public void setConnectionManager(org.apache.commons.httpclient.HttpConnectionManager connectionManager)
Sets the HTTP connection factory used to create HTTP connections

setVar

public void setVar(java.lang.String var)
Sets the variable name for the HttpMethod object

getUrl

public java.lang.String getUrl()
Returns:
the URL of this HTTP request

setUrl

public void setUrl(java.lang.String url)
Sets the URL of this request

createConnection

protected org.apache.commons.httpclient.HttpConnection createConnection()
                                                                 throws org.apache.commons.httpclient.HttpException,
                                                                        java.net.MalformedURLException
A Factory method to create a new HTTP connection


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