org.abstracthorizon.danube.http.matcher
Class WelcomeFile

java.lang.Object
  extended by org.abstracthorizon.danube.http.matcher.AbstractMatcher
      extended by org.abstracthorizon.danube.http.matcher.WelcomeFile
All Implemented Interfaces:
Matcher

public class WelcomeFile
extends AbstractMatcher

This matcher matches only paths that end with "/". If path is matched then welcome file is added as component resource path.

Author:
Daniel Sendula

Field Summary
protected  String welcomeFile
          Welcome file
 
Fields inherited from class org.abstracthorizon.danube.http.matcher.AbstractMatcher
connectionHandler, stopOnMatch
 
Constructor Summary
WelcomeFile()
          Constructor
 
Method Summary
 void adjustForInvocation(HTTPConnection httpConnection)
          Adjusts connection for nested connection handler to be invoked
 String getWelcomeFile()
          Returns welcome file
 boolean matches(HTTPConnection httpConnection)
          This matcher checks prefix of requested path.
 void setWelcomeFile(String welcomeFile)
          Sets welcome file
 
Methods inherited from class org.abstracthorizon.danube.http.matcher.AbstractMatcher
getConnectionHandler, isStopOnMatch, setConnectionHandler, setStopOnMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

welcomeFile

protected String welcomeFile
Welcome file

Constructor Detail

WelcomeFile

public WelcomeFile()
Constructor

Method Detail

getWelcomeFile

public String getWelcomeFile()
Returns welcome file

Returns:
welcome file

setWelcomeFile

public void setWelcomeFile(String welcomeFile)
Sets welcome file

Parameters:
welcomeFile - welcome file

matches

public boolean matches(HTTPConnection httpConnection)
This matcher checks prefix of requested path. If path starts with given prefix and following character is "/" or path is exactly the same length as prefix then it returns positive match

Parameters:
httpConnection - http connection
Returns:
true if uri from connection is matched

adjustForInvocation

public void adjustForInvocation(HTTPConnection httpConnection)
Adjusts connection for nested connection handler to be invoked

Parameters:
connection - connection to be a used


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.