|
Oracle Fusion Middleware Java API Reference for Oracle Event Processing 12c Release 1 (12.1.3.0.0) E54267-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Indicates that a method is used to inject a stage with its configuration object during the prepare phase of a configuration update. The method will also be invoked when the stage is initialized after static dependencies have been injected. The annotated method must have a single parameter whose type is the type, or a supertype, of the configuration object that is injected. The return type of the method must be void. Only a single method on a class may be annotated with the Prepare annotation, however, both a superclass and its subclass may be annotated. In this case, the superclass method will be invoked before invoking the subclass method.
The Java type of the configuration object passed to the Prepare method is determined by JAXB. By default, the Java class name is the same as the name of the XML Schema complex type that describes the configuration data for the stage. See the wlevs_application_config.xsd for more detail.
Code example:
@Prepare public void prepareConfig(MyAdapterConfig config) throws Exception { ... }
The purpose of the Prepare callback is to validate the configuration data and do any work necessary to ensure that the Activate callback will succeed. If the Prepare method detects that the configuration data is invalid it must throw a RuntimeException after performing any necessary cleanup. Following an unsuccessful invocation, the prepare method may be called again if additional configuration updates are attempted while the application is running.
Methods inherited from interface java.lang.annotation.Annotation |
annotationType, equals, hashCode, toString |
|
Copyright © 2007, 2014 Oracle and/or its affiliates. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |