* Copyright (c) 2010-2011. Axon Framework
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
The interceptor is responsible for the continuation of the dispatch process by invoking the
method on the given
Any information gathered by interceptors may be attached to the unitOfWork. This information is made available to the CommandCallback provided by the dispatching component.
Interceptors are highly recommended not to change the type of the command handling result, as the dispatching component might expect a result of a specific type.
commandThe command being dispatched
unitOfWorkThe UnitOfWork in which
interceptorChainThe interceptor chain that allows this interceptor to proceed the dispatch process
java.lang.Throwableany exception that occurs while handling the command
Object handle(Object command, UnitOfWork unitOfWork, InterceptorChain interceptorChain) throws Throwable;