SunONE Application Server v8.0 PE

com.sun.appserv.web.cache.mapping
Class CacheMapping

java.lang.Object
  extended bycom.sun.appserv.web.cache.mapping.CacheMapping

public class CacheMapping
extends java.lang.Object

CacheMapping represents a cache target specified via servlet-name or a url-pattern, a timeout, allowed methods, a set of key fields to be used to construct the key into the cache, and a set of constraints on the field values.


Constructor Summary
CacheMapping()
          default cache mapping
 
Method Summary
 void addConstraintField(ConstraintField field)
          add a constraint key field
 void addKeyField(Field field)
          add a key field
 void addMethod(java.lang.String method)
          add an allowable HTTP method
 boolean findMethod(java.lang.String method)
          Return true if the specified HTTP request method is allowed for caching
 ConstraintField[] getConstraintFields()
          get the constraint fields
 java.lang.String getHelperNameRef()
          get helper-name-ref associated with this mapping
 Field[] getKeyFields()
          get the key fields
 Field getRefreshField()
          get the refresh field
 java.lang.String getServletName()
          get the underlying servlet-name
 int getTimeout()
          get the timeout
 Field getTimeoutField()
          get the timeout field
 java.lang.String getURLPattern()
          get the underlying url-pattern this mapping applicable
 void setHelperNameRef(java.lang.String helperNameRef)
          set the helper-ref associated with this
 void setMethods(java.lang.String[] methods)
          set allowable HTTP methods
 void setRefreshField(Field field)
          set the refresh field
 void setServletName(java.lang.String servletName)
          set the servlet-name this mapping applies
 void setTimeout(int timeout)
          set the timeout
 void setTimeoutField(Field field)
          set the timeout field
 void setURLPattern(java.lang.String urlPattern)
          set the url-pattern this mapping applies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheMapping

public CacheMapping()
default cache mapping

Method Detail

setHelperNameRef

public void setHelperNameRef(java.lang.String helperNameRef)
set the helper-ref associated with this


setServletName

public void setServletName(java.lang.String servletName)
set the servlet-name this mapping applies

Parameters:
servletName - name of the servlet

setURLPattern

public void setURLPattern(java.lang.String urlPattern)
set the url-pattern this mapping applies

Parameters:
urlPattern - url pattern this mapping applies

setTimeout

public void setTimeout(int timeout)
set the timeout

Parameters:
timeout - specific timeout of the cacheable entries

setTimeoutField

public void setTimeoutField(Field field)
set the timeout field


setRefreshField

public void setRefreshField(Field field)
set the refresh field


getRefreshField

public Field getRefreshField()
get the refresh field


setMethods

public void setMethods(java.lang.String[] methods)
set allowable HTTP methods

Parameters:
methods - allowable methods

addMethod

public void addMethod(java.lang.String method)
add an allowable HTTP method

Parameters:
method - allowable method

addKeyField

public void addKeyField(Field field)
add a key field

Parameters:
field - key Field to add

addConstraintField

public void addConstraintField(ConstraintField field)
add a constraint key field

Parameters:
field - ConstraintField to add

getHelperNameRef

public java.lang.String getHelperNameRef()
get helper-name-ref associated with this mapping


getServletName

public java.lang.String getServletName()
get the underlying servlet-name


getURLPattern

public java.lang.String getURLPattern()
get the underlying url-pattern this mapping applicable


findMethod

public boolean findMethod(java.lang.String method)
Return true if the specified HTTP request method is allowed for caching

Parameters:
method - Request method to check

getTimeout

public int getTimeout()
get the timeout


getTimeoutField

public Field getTimeoutField()
get the timeout field


getKeyFields

public Field[] getKeyFields()
get the key fields


getConstraintFields

public ConstraintField[] getConstraintFields()
get the constraint fields


SunONE Application Server v8.0 PE

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.