public abstract class AS2Service extends LicensedService
If both failId and successId are set, then no exception will be thrown, and the service is treated as a branching service and the next service id will set to the failId on exception, and successId on successful processing
All concrete implementations of this service will require an Enterprise license.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String[] |
AS2_HEADERS |
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
AS2Service()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
additionalDebug() |
protected void |
closeService() |
protected static boolean |
containsKey(AdaptrisMessage msg,
java.lang.String key) |
void |
doService(AdaptrisMessage msg)
Service the
AdaptrisMessage . |
protected <T> T |
get(AdaptrisMessage msg,
java.lang.Class<T> type) |
java.lang.Boolean |
getAdditionalDebug() |
java.lang.String |
getFailId() |
protected <T> T |
getQuietly(AdaptrisMessage msg,
java.lang.Class<T> type) |
java.lang.String |
getSuccessId() |
protected abstract void |
handleService(AdaptrisMessage msg)
Perform the actual service.
|
protected static boolean |
hasFromTo(AdaptrisMessage msg) |
protected void |
initService() |
boolean |
isBranching() |
boolean |
isEnabled(License license) |
protected void |
logBodyPart(java.lang.String txt,
javax.mail.internet.MimeBodyPart mbp) |
protected java.lang.String |
objectMetadataKey() |
protected void |
prepareService() |
protected abstract void |
serviceInit()
Initialise the concrete implementation.
|
void |
setAdditionalDebug(java.lang.Boolean b)
Enable additional debug where available.
|
void |
setFailId(java.lang.String s) |
void |
setSuccessId(java.lang.String s) |
prepare
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsConfirmation, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isConfirmation, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, rethrowServiceException, retrieveComponentState, setContinueOnFail, setIsConfirmation, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
protected final void initService() throws CoreException
initService
in class ServiceImp
CoreException
ComponentLifecycle.init()
protected void closeService()
closeService
in class ServiceImp
ComponentLifecycle.close()
protected abstract void serviceInit() throws CoreException
CoreException
ServiceImp.init()
protected abstract void handleService(AdaptrisMessage msg) throws java.lang.Exception
java.lang.Exception
doService(AdaptrisMessage)
public final void doService(AdaptrisMessage msg) throws ServiceException
AdaptrisMessage
.
If both failId and successId are set, then no exception will be thrown, and the service is treated as a branching service and the next service id will set to the failId on exception, and successId on successful processing
ServiceException
public final boolean isEnabled(License license)
protected void prepareService() throws CoreException
prepareService
in class LicensedService
CoreException
public boolean isBranching()
isBranching
in interface Service
isBranching
in class ServiceImp
ServiceImp.isBranching()
protected java.lang.String objectMetadataKey()
public java.lang.String getFailId()
public void setFailId(java.lang.String s)
s
- the failId to setpublic java.lang.String getSuccessId()
public void setSuccessId(java.lang.String s)
s
- the successId to setprotected void logBodyPart(java.lang.String txt, javax.mail.internet.MimeBodyPart mbp) throws javax.mail.MessagingException, java.io.IOException
javax.mail.MessagingException
java.io.IOException
protected boolean additionalDebug()
public java.lang.Boolean getAdditionalDebug()
public void setAdditionalDebug(java.lang.Boolean b)
b
- the additionalDebug to setprotected <T> T get(AdaptrisMessage msg, java.lang.Class<T> type) throws ServiceException
ServiceException
protected <T> T getQuietly(AdaptrisMessage msg, java.lang.Class<T> type)
protected static boolean hasFromTo(AdaptrisMessage msg)
protected static boolean containsKey(AdaptrisMessage msg, java.lang.String key)