Package com.adaptris.core.ftp
Class AggregatingFtpConsumeService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.aggregator.AggregatingConsumeServiceImpl<FileTransferConnection>
-
- com.adaptris.core.ftp.AggregatingFtpConsumeService
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ConnectedService
,MessageEventGenerator
,Service
,AggregatingConsumeService<FileTransferConnection>
,StateManagedComponent
@ComponentProfile(summary="Allows you to aggregate messages from an FTP server", tag="service,aggregation,ftp", recommended=FileTransferConnection.class) public class AggregatingFtpConsumeService extends AggregatingConsumeServiceImpl<FileTransferConnection> implements ConnectedService
Implentation ofAggregatingConsumeService
that allows you to consume a related message via FTP based on some criteria.In the adapter configuration file this class is aliased as aggregating-ftp-consume-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description AggregatingFtpConsumeService()
AggregatingFtpConsumeService(AdaptrisConnection conn, AggregatingFtpConsumer consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doService(AdaptrisMessage msg)
Apply the service to the message.AdaptrisConnection
getConnection()
Returns theAdaptrisConnection
to use.AggregatingFtpConsumer
getConsumer()
protected void
initService()
void
prepare()
Prepare for initialisation.void
setConnection(AdaptrisConnection connection)
Sets theAdaptrisConnection
to use.void
setConsumer(AggregatingFtpConsumer fsConsumer)
-
Methods inherited from class com.adaptris.core.services.aggregator.AggregatingConsumeServiceImpl
closeService, start, start, stop, stop
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, isBranching, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Constructor Detail
-
AggregatingFtpConsumeService
public AggregatingFtpConsumeService()
-
AggregatingFtpConsumeService
public AggregatingFtpConsumeService(AdaptrisConnection conn, AggregatingFtpConsumer consumer)
-
-
Method Detail
-
initService
protected void initService() throws CoreException
- Overrides:
initService
in classAggregatingConsumeServiceImpl<FileTransferConnection>
- Throws:
CoreException
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
Description copied from interface:Service
Apply the service to the message.
- Specified by:
doService
in interfaceService
- Parameters:
msg
- theAdaptrisMessage
to process- Throws:
ServiceException
- wrapping any underlyingException
s
-
getConsumer
public AggregatingFtpConsumer getConsumer()
- Returns:
- the fsConsumer
-
setConsumer
public void setConsumer(AggregatingFtpConsumer fsConsumer)
- Parameters:
fsConsumer
- the fsConsumer to set
-
prepare
public void prepare() throws CoreException
Description copied from interface:ComponentLifecycleExtension
Prepare for initialisation.- Specified by:
prepare
in interfaceComponentLifecycleExtension
- Throws:
CoreException
-
getConnection
public AdaptrisConnection getConnection()
Description copied from interface:ConnectedService
Returns theAdaptrisConnection
to use.- Specified by:
getConnection
in interfaceConnectedService
- Returns:
- the
AdaptrisConnection
-
setConnection
public void setConnection(AdaptrisConnection connection)
Description copied from interface:ConnectedService
Sets theAdaptrisConnection
to use.- Specified by:
setConnection
in interfaceConnectedService
- Parameters:
connection
- theAdaptrisConnection
to use
-
-