Class VerifyIdentityService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.security.access.VerifyIdentityService
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Verify and control access based on the message contents", tag="service,security") public class VerifyIdentityService extends ServiceImp
A simple service that allows you to verify that the message contents and/or metadata passes muster.If
IdentityVerifier.validate(IdentityBuilder, AdaptrisMessage)
returnsfalse
then an exception is thrown. If you want to use this as a branch; then you should wrap the service inside aBranchingServiceEnabler
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description VerifyIdentityService()
VerifyIdentityService(IdentityBuilder b, IdentityVerifier v)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeService()
void
doService(AdaptrisMessage msg)
Apply the service to the message.IdentityBuilder
getBuilder()
IdentityVerifier
getVerifier()
protected void
initService()
void
prepare()
Prepare for initialisation.void
setBuilder(IdentityBuilder builder)
void
setVerifier(IdentityVerifier verifier)
void
start()
Starts the component.void
stop()
Stop the component-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
-
-
-
Constructor Detail
-
VerifyIdentityService
public VerifyIdentityService()
-
VerifyIdentityService
public VerifyIdentityService(IdentityBuilder b, IdentityVerifier v)
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
Description copied from interface:Service
Apply the service to the message.
- Parameters:
msg
- theAdaptrisMessage
to process- Throws:
ServiceException
- wrapping any underlyingException
s
-
prepare
public void prepare() throws CoreException
Description copied from interface:ComponentLifecycleExtension
Prepare for initialisation.- Throws:
CoreException
-
initService
protected void initService() throws CoreException
- Specified by:
initService
in classServiceImp
- Throws:
CoreException
-
start
public void start() throws CoreException
Description copied from interface:ComponentLifecycle
Starts the component.Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling start will begin message delivery.- Specified by:
start
in interfaceComponentLifecycle
- Overrides:
start
in classServiceImp
- Throws:
CoreException
- wrapping any underlyingException
s
-
stop
public void stop()
Description copied from interface:ComponentLifecycle
Stop the componentA stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling stop will pause message delivery. Throwing aRuntimeException
may cause unintended consequences- Specified by:
stop
in interfaceComponentLifecycle
- Overrides:
stop
in classServiceImp
-
closeService
protected void closeService()
- Specified by:
closeService
in classServiceImp
-
getBuilder
public IdentityBuilder getBuilder()
- Returns:
- the builder
-
setBuilder
public void setBuilder(IdentityBuilder builder)
- Parameters:
builder
- the builder to set
-
getVerifier
public IdentityVerifier getVerifier()
- Returns:
- the verifier
-
setVerifier
public void setVerifier(IdentityVerifier verifier)
- Parameters:
verifier
- the verifier to set
-
-