Package org.fcrepo.camel.fixity
Class FcrepoFixityConfig
- java.lang.Object
-
- org.fcrepo.camel.common.config.BasePropsConfig
-
- org.fcrepo.camel.fixity.FcrepoFixityConfig
-
@Configuration @Conditional(org.fcrepo.camel.fixity.FcrepoFixityConfig.FixityEnabled.class) public class FcrepoFixityConfig extends org.fcrepo.camel.common.config.BasePropsConfig
A configuration class for the Fixity service- Author:
- dbernstein
-
-
Constructor Summary
Constructors Constructor Description FcrepoFixityConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.builder.RouteBuilderfixityRoute()longgetFixityDelay()Because fixity checking can put a significant load on a server, it can be convenient to introduce a delay between each fixity check.StringgetFixityFailure()Most importantly, it is possible to configure what should happen when a fixity check fails.StringgetFixitySuccess()It is also possible to trigger an action on success (by default, this is a no-op):StringgetInputStream()The jms message stream for the fixity serviceorg.apache.camel.component.http.HttpComponenthttp()org.apache.camel.component.http.HttpComponenthttps()
-
-
-
Constructor Detail
-
FcrepoFixityConfig
public FcrepoFixityConfig()
-
-
Method Detail
-
getInputStream
public String getInputStream()
The jms message stream for the fixity service- Returns:
-
getFixityDelay
public long getFixityDelay()
Because fixity checking can put a significant load on a server, it can be convenient to introduce a delay between each fixity check. That delay is measured in milliseconds.
-
getFixitySuccess
public String getFixitySuccess()
It is also possible to trigger an action on success (by default, this is a no-op):
-
getFixityFailure
public String getFixityFailure()
Most importantly, it is possible to configure what should happen when a fixity check fails. In the default example below, the fixity output is written to a file in `/tmp/fixityErrors.log`. But this can be changed to send a message to an email address (`fixity.failure=smtp:admin@example.org?subject=Fixity`) or use just about any other camel component.
-
http
@Bean(name="http") public org.apache.camel.component.http.HttpComponent http()
-
https
@Bean(name="https") public org.apache.camel.component.http.HttpComponent https()
-
fixityRoute
@Bean public org.apache.camel.builder.RouteBuilder fixityRoute()
-
-