Controls access to the wrapped handler using the real remote IP. Control is
provided by and IncludeExcludeSet over a InetAddressSet. This
handler uses the real internet address of the connection, not one reported in
the forwarded for headers, as this cannot be as easily forged.
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| private void | |
| protected boolean | onConditionsMet(Request
The request to handle request, Response The response to generate response, Callback The callback for completion callback)Implements abstract org. |
| protected boolean | onConditionsNotMet(Request
The request to handle request, Response The response to generate response, Callback The callback for completion callback)Implements abstract org. |
| InetAccessHandler | back to summary |
|---|---|
| public InetAccessHandler() | |
| InetAccessHandler | back to summary |
|---|---|
| public InetAccessHandler(Handler handler) | |
| exclude | back to summary |
|---|---|
| public void exclude(String pattern) Excludes an InetAccess entry pattern with an optional connector name, address and URI mapping. The connector name is separated from the InetAddress pattern with an '@' character, and the InetAddress pattern is separated from the URI pattern using the "|" (pipe) character. A method name is separated from the URI pattern using the ">" character. URI patterns follow the servlet specification for simple * prefix and suffix wild cards (e.g. /, /foo, /foo/bar, /foo/bar/*, *.baz). Examples:
| |
| exclude | back to summary |
|---|---|
| public void exclude(String... patterns) Excludes InetAccess patterns
| |
| exclude | back to summary |
|---|---|
| public void exclude(String connectorName, String addressPattern, PathSpec pathSpec) Excludes an InetAccess entry. | |
| include | back to summary |
|---|---|
| public void include(String pattern) Includes an InetAccess pattern with an optional connector name, address and URI mapping. The connector name is separated from the InetAddress pattern with an '@' character, and the InetAddress pattern is separated from the URI pattern using the "|" (pipe) character. URI patterns follow the servlet specification for simple * prefix and suffix wild cards (e.g. /, /foo, /foo/bar, /foo/bar/*, *.baz). Examples:
| |
| include | back to summary |
|---|---|
| public void include(String... patterns) Includes InetAccess patterns
| |
| include | back to summary |
|---|---|
| public void include(String connectorName, String addressPattern, PathSpec pathSpec) Includes an InetAccess entry. | |
| includeExclude | back to summary |
|---|---|
| private void includeExclude(boolean include, String pattern) | |
| onConditionsMet | back to summary |
|---|---|
| protected boolean onConditionsMet(Request request, Response response, Callback callback) throws Exception Implements abstract org. Doc from org. Handle a request that has met the conditions.
Typically, the implementation will provide optional handling and then call the
| |
| onConditionsNotMet | back to summary |
|---|---|
| protected boolean onConditionsNotMet(Request request, Response response, Callback callback) throws Exception Implements abstract org. Doc from org. This method is called when the request has not met the conditions and is not to be handled by this handler. Implementations may return false; send an error response; or handle the request differently. | |