org.neociclo.accord.odetteftp.camel
Class OdetteEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by org.apache.camel.impl.ScheduledPollEndpoint
          extended by org.neociclo.accord.odetteftp.camel.OdetteEndpoint
All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.MultipleConsumersSupport, org.apache.camel.Service

public class OdetteEndpoint
extends org.apache.camel.impl.ScheduledPollEndpoint
implements org.apache.camel.Service, org.apache.camel.MultipleConsumersSupport


Field Summary
static String ODETTE_ANSWER_COUNT
           
static String ODETTE_ANSWER_REASON
           
static String ODETTE_DATASET_NAME
           
static String ODETTE_DATE_TIME
           
static String ODETTE_DELIVERY_NOTIFICATION
           
static String ODETTE_DESTINATION
           
static String ODETTE_FILE_DESCRIPTION
           
static String ODETTE_FORCE_RESTART
           
static String ODETTE_NEGATIVE_RESPONSE_REASON
           
static String ODETTE_NERP_CREATOR
           
static String ODETTE_NERP_TEXT
           
static String ODETTE_ORIGINATOR
           
static String ODETTE_OVERRIDE
           
static String ODETTE_REASON_TEXT
           
static String ODETTE_RECORD_FORMAT
           
static String ODETTE_RECORD_SIZE
           
static String ODETTE_RESTART_OFFSET
           
static String ODETTE_RETRY_LATER
           
static String ODETTE_SEND_FILE_STARTED
           
static String ODETTE_SOURCE_FILE
           
static String ODETTE_TOTAL_OCTETS_SENT
           
static String ODETTE_USER_DATA
           
static String ODETTE_VIRTUAL_FILE
           
static String ODETTE_WAIT_FOR_DELIVERY
           
 
Constructor Summary
OdetteEndpoint(String uri, OdetteComponent component, OdetteConfiguration configuration)
           
 
Method Summary
 org.neociclo.accord.odetteftp.camel.IncomingFileResponse askConsumerForIncomingFile(VirtualFile incomingFile)
           
 void configureMessage(org.apache.camel.component.file.GenericFile<File> file, VirtualFile virtualFile, org.apache.camel.Message message)
          Configures the given message with the file which sets the body to the file object.
protected  void configureOdetteMessage(org.apache.camel.Message message, DeliveryNotification notif)
           
 org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
           
 org.apache.camel.Exchange createExchange(org.apache.camel.component.file.GenericFile<File> file)
           
 org.apache.camel.Producer createProducer()
           
 OdetteConfiguration getConfiguration()
           
 OdetteOperations getOdetteOperations()
           
 boolean isMultipleConsumersSupported()
           
 boolean isSingleton()
           
 void notifyConsumerOf(DeliveryNotification notif)
           
 void notifyConsumerOf(VirtualFile incomingFile)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configureConsumer, configureProperties, getConsumerProperties, setConsumerProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, hashCode, isLenientProperties, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ODETTE_SOURCE_FILE

public static final String ODETTE_SOURCE_FILE
See Also:
Constant Field Values

ODETTE_ORIGINATOR

public static final String ODETTE_ORIGINATOR
See Also:
Constant Field Values

ODETTE_DESTINATION

public static final String ODETTE_DESTINATION
See Also:
Constant Field Values

ODETTE_DATASET_NAME

public static final String ODETTE_DATASET_NAME
See Also:
Constant Field Values

ODETTE_VIRTUAL_FILE

public static final String ODETTE_VIRTUAL_FILE
See Also:
Constant Field Values

ODETTE_RECORD_FORMAT

public static final String ODETTE_RECORD_FORMAT
See Also:
Constant Field Values

ODETTE_RECORD_SIZE

public static final String ODETTE_RECORD_SIZE
See Also:
Constant Field Values

ODETTE_RESTART_OFFSET

public static final String ODETTE_RESTART_OFFSET
See Also:
Constant Field Values

ODETTE_DATE_TIME

public static final String ODETTE_DATE_TIME
See Also:
Constant Field Values

ODETTE_USER_DATA

public static final String ODETTE_USER_DATA
See Also:
Constant Field Values

ODETTE_DELIVERY_NOTIFICATION

public static final String ODETTE_DELIVERY_NOTIFICATION
See Also:
Constant Field Values

ODETTE_RETRY_LATER

public static final String ODETTE_RETRY_LATER
See Also:
Constant Field Values

ODETTE_OVERRIDE

public static final String ODETTE_OVERRIDE
See Also:
Constant Field Values

ODETTE_FORCE_RESTART

public static final String ODETTE_FORCE_RESTART
See Also:
Constant Field Values

ODETTE_REASON_TEXT

public static final String ODETTE_REASON_TEXT
See Also:
Constant Field Values

ODETTE_ANSWER_REASON

public static final String ODETTE_ANSWER_REASON
See Also:
Constant Field Values

ODETTE_NEGATIVE_RESPONSE_REASON

public static final String ODETTE_NEGATIVE_RESPONSE_REASON
See Also:
Constant Field Values

ODETTE_NERP_CREATOR

public static final String ODETTE_NERP_CREATOR
See Also:
Constant Field Values

ODETTE_NERP_TEXT

public static final String ODETTE_NERP_TEXT
See Also:
Constant Field Values

ODETTE_FILE_DESCRIPTION

public static final String ODETTE_FILE_DESCRIPTION
See Also:
Constant Field Values

ODETTE_TOTAL_OCTETS_SENT

public static final String ODETTE_TOTAL_OCTETS_SENT
See Also:
Constant Field Values

ODETTE_SEND_FILE_STARTED

public static final String ODETTE_SEND_FILE_STARTED
See Also:
Constant Field Values

ODETTE_ANSWER_COUNT

public static final String ODETTE_ANSWER_COUNT
See Also:
Constant Field Values

ODETTE_WAIT_FOR_DELIVERY

public static final String ODETTE_WAIT_FOR_DELIVERY
See Also:
Constant Field Values
Constructor Detail

OdetteEndpoint

public OdetteEndpoint(String uri,
                      OdetteComponent component,
                      OdetteConfiguration configuration)
               throws Exception
Throws:
Exception
Method Detail

getConfiguration

public OdetteConfiguration getConfiguration()

createConsumer

public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
                                         throws Exception
Specified by:
createConsumer in interface org.apache.camel.Endpoint
Throws:
Exception

createProducer

public org.apache.camel.Producer createProducer()
                                         throws Exception
Specified by:
createProducer in interface org.apache.camel.Endpoint
Throws:
Exception

createExchange

public org.apache.camel.Exchange createExchange(org.apache.camel.component.file.GenericFile<File> file)

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.apache.camel.IsSingleton

getOdetteOperations

public OdetteOperations getOdetteOperations()

configureMessage

public void configureMessage(org.apache.camel.component.file.GenericFile<File> file,
                             VirtualFile virtualFile,
                             org.apache.camel.Message message)
Configures the given message with the file which sets the body to the file object.

Parameters:
virtualFile -

configureOdetteMessage

protected void configureOdetteMessage(org.apache.camel.Message message,
                                      DeliveryNotification notif)

start

public void start()
           throws Exception
Specified by:
start in interface org.apache.camel.Service
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface org.apache.camel.Service
Throws:
Exception

isMultipleConsumersSupported

public boolean isMultipleConsumersSupported()
Specified by:
isMultipleConsumersSupported in interface org.apache.camel.MultipleConsumersSupport

notifyConsumerOf

public void notifyConsumerOf(VirtualFile incomingFile)

notifyConsumerOf

public void notifyConsumerOf(DeliveryNotification notif)

askConsumerForIncomingFile

public org.neociclo.accord.odetteftp.camel.IncomingFileResponse askConsumerForIncomingFile(VirtualFile incomingFile)


ACCORD