RouterAuditEventHandler.java revision 92327eba2d504cf38480c3d35550967289071f68
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2015 ForgeRock AS.
*
* 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
* 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]"
*/
/**
* Audit event handler that logs to a router target.
*/
public class RouterAuditEventHandler extends AuditEventHandlerBase<RouterAuditEventHandlerConfiguration> {
/** Logger */
/** router target resource path */
private ResourcePath resourcePath;
/** the DependencyProvider to provide access to the ConnectionFactory */
private DependencyProvider dependencyProvider;
/**
* {@inheritDoc}
*/
}
/**
* {@inheritDoc}
*/
this.dependencyProvider = provider;
}
}
/**
* {@inheritDoc}
*/
public void close() throws ResourceException {
}
/**
* {@inheritDoc}
*/
public Promise<ActionResponse, ResourceException> actionCollection(Context context, ActionRequest actionRequest) {
}
/**
* {@inheritDoc}
*/
public Promise<ActionResponse, ResourceException> actionInstance(Context context, String resourceId,
}
/**
* {@inheritDoc}
*/
public Promise<ResourceResponse, ResourceException> createInstance(Context context, CreateRequest request) {
try {
request.getContent())));
} catch (Exception e) {
}
}
/**
* {@inheritDoc}
*/
public Promise<QueryResponse, ResourceException> queryCollection(Context context, QueryRequest request,
final QueryResourceHandler queryResourceHandler) {
try {
return newResultPromise(
new QueryResourceHandler() {
}
}));
} catch (Exception e) {
}
}
/**
* {@inheritDoc}
*/
public Promise<ResourceResponse, ResourceException> readInstance(Context context, String resourceId,
try {
return newResultPromise(getConnectionFactory().getConnection().read(new AuditContext(context), newRequest));
} catch (Exception e) {
}
}
/**
* {@inheritDoc}
*/
return RouterAuditEventHandlerConfiguration.class;
}
}