AmAgentBaseFilter.java revision 8f2e32e3c8f43b9b84cfd30b36477d4fb69acb71
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: AmAgentBaseFilter.java,v 1.6 2009/03/26 18:29:23 ww203982 Exp $
*
*/
/**
* Portions Copyrighted 2011-2013 ForgeRock AS
*/
/**
* The base class for agent filter
*/
public abstract class AmAgentBaseFilter implements Filter
{
public void doFilter(
throws IOException, ServletException
{
try {
break;
break;
break;
break;
break;
default :
throw new AgentException("Unknown filter result status: "
}
} catch(AgentException ex) {
}
}
public void allowRequestToContinue(
throws IOException, ServletException
{
} else {
}
if (needProcessResponse) {
} else {
}
}
throws IOException, ServletException {
if (getWsResponseProcessor() != null) {
+ respContent);
}
}
}
public void destroy() {
// Let any registered components of the ShutdownManager know to shutdown.
if (shutdownMan.acquireValidLock()) {
try {
} finally {
}
}
}
}
public FilterConfig getFilterConfig() {
return _config;
}
throws IOException
{
try {
if (needProcessResponse) {
} else {
}
} catch(IOException ex) {
throw ex;
} finally {
}
}
}
protected abstract AmFilterMode getDefaultFilterMode();
protected abstract AmFilterMode[] getAllowedFilterModes();
{
if (suggestedMode != null) {
if (isAllowedFilterMode(suggestedMode)) {
}
}
if (globalMode != null) {
if (isAllowedFilterMode(globalMode)) {
result = globalMode;
}
}
}
}
return result;
}
protected AmFilterMode getFilterMode() {
return _filterMode;
}
protected String getApplicationName() {
return _applicationName;
}
private IWebServiceResponseProcessor getWsResponseProcessor() {
return _wsResponseProcessor;
}
protected boolean isInitialized() {
return _initialized;
}
boolean result = false;
}
result = true;
break;
}
}
return result;
}
throws AgentException
{
if (!isInitialized()) {
{
} else {
}
if (suggestedMode == null) {
"AmAgentFilter: Unknown filter mode for "
+ applicationName + ". Using configured mode");
}
+ applicationName + " is: "
} else {
+ applicationName);
}
+ applicationName + " set to: "
if (wsEnabled) {
if (wsResponseProcessorImpl != null
try {
} catch (Exception e) {
}
} else {
throw new AgentException("No WebServiceAuthenticator found");
}
}
} else {
throw new AgentException(
"AmAgentFilter: Unable to obtain system access");
}
}
}
}
throws AgentException {
if (!isInitialized()) {
}
}
private void markInitialized() {
_initialized = true;
}
}
}
private void setWsResponseProcessor(IWebServiceResponseProcessor
}
private String _applicationName;
private FilterConfig _config;
private boolean _initialized;
private AmFilterMode _filterMode;
}