Created
February 28, 2013 03:24
-
-
Save imeredith/5053930 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static class RequestImpl implements Request { | |
private final String uri; | |
public RequestImpl(String uri) { | |
this.uri = uri; | |
} | |
@Override | |
public String getRequestURI() { | |
return uri; | |
} | |
@Override | |
public String getHeader(String name) { | |
return null; | |
} | |
@Override | |
public String getRemoteUser() { | |
return null; | |
} | |
@Override | |
public Enumeration getParameterNames() { | |
return Collections.enumeration(Collections.EMPTY_LIST); | |
} | |
@Override | |
public String[] getParameterValues(String name) { | |
return new String[0]; | |
} | |
@Override | |
public Object getAttribute(String name) { | |
return null; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RequestImpl(url: String) extends Request { | |
override def getRequestURI = url | |
override def getHeader(name: String) = null | |
override def getRemoteUser = null | |
override def getParameterNames = Collections.enumeration(Collections.EMPTY_LIST); | |
override def getParameterValues(name: String) = Array[String]() | |
override def getAttribute(name: String) = null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment