* 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.
AnnotationCommandHandlerAdapterto subscribe the annotated class to the command bus.
Alternatively, the annotations may be placed on an AggregateRoot, in which case the
AggregateAnnotationCommandHandler can be used to subscribe the handlers to the command bus. When the annotation
appears on an Aggregate's constructor, that command will cause a new aggregate to be created and stored in the
repository provided with the
The annotated method's first parameter is the command handled by that method. Optionally, the command handler may
specify a second parameter of type
org.axonframework.unitofwork.UnitOfWork. The active Unit of Work will be
passed if that parameter is supplied.