Package org.talend.transform.camel

# Class TdmSampleEndpoint

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.talend.transform.camel.TdmSampleEndpoint

All Implemented Interfaces:
  `AutoCloseable`, `org.apache.camel.CamelContextAware`, `org.apache.camel.ComponentAware`, `org.apache.camel.Endpoint`, `org.apache.camel.IsSingleton`, `org.apache.camel.Service`, `org.apache.camel.ShutdownableService`, `org.apache.camel.spi.HasCamelContext`, `org.apache.camel.spi.HasId`, `org.apache.camel.StatefulService`, `org.apache.camel.SuspendableService`

public class TdmSampleEndpoint extends org.apache.camel.support.DefaultEndpoint
For tests only. This delivers sample files contents.

TdmEndpoint wraps the `TdmSampleConsumer` to allow it to run in a camel route being configured through the `TdmSampleComponent`.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Object`
`_document`
`protected String`
`_mapPath`
`protected int`
`_numberTimes`

### Fields inherited from class org.apache.camel.support.service.BaseService

`BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING`

## Method Summary

Modifier and Type
Method
Description
`org.apache.camel.Consumer`
`createConsumer(org.apache.camel.Processor processor)`
`org.apache.camel.PollingConsumer`
`createPollingConsumer()`
`org.apache.camel.Producer`
`createProducer()`
`String`
`getDevInstall()`
Get the development install area - used for projects that are part of the installation.
`String`
`getDevWorkspace()`
Get the development workspace - used for executing projects directly from the development workspace.
`String`
`getDummy()`
`protected static byte[]`
`getExampleDocument(InputStream is)`
`String`
`getLog()`
Gets the previously set logging value.
`String`
`getMapPath()`
Return the path of the map that has the sample document.
`int`
`getNumberTimes()`
Get the number of times to emit the sample document.
`String`
`getProjectArchives()`
Get the list of project archive URLs required to access the map.
`String`
`getProjects()`
Get the names of the projects required to access the map.
`boolean`
`isSingleton()`
`void`
`setDevInstall(String devInstall)`
Set the development install area - used for projects that are part of the installation.
`void`
`setDevWorkspace(String devWorkspace)`
Set the development workspace - used for executing projects directly from the development workspace.
`void`
`setDummy(String dummy)`
`void`
`setLog(String projects)`
Sets the type of logging for the underlying RuntimeEngine.
`void`
`setMapPath(String mapPath)`
Set the path of the map that has the sample document.
`void`
`setNumberTimes(int numberTimes)`
Set the number of times to emit the sample documents.
`void`
`setProjectArchives(String projectArchives)`
Set the list of project archive URLs required to access the map.
`void`
`setProjects(String projects)`
Set the names of the projects required to access the map.

### Methods inherited from class org.apache.camel.support.DefaultEndpoint

`configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString`

### Methods inherited from class org.apache.camel.support.service.BaseService

`build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.camel.ComponentAware

`getComponent`

### Methods inherited from interface org.apache.camel.Endpoint

`getEndpointBaseUri, isRemote, isSingletonProducer`

### Methods inherited from interface org.apache.camel.Service

`build, close, init, start, stop`

### Methods inherited from interface org.apache.camel.ShutdownableService

`shutdown`

### Methods inherited from interface org.apache.camel.StatefulService

`getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending`

### Methods inherited from interface org.apache.camel.SuspendableService

`isSuspended, resume, suspend`

## Field Details

### _mapPath

protected String _mapPath

### _document

protected Object _document

### _numberTimes

protected int _numberTimes

## Method Details

### getNumberTimes

public int getNumberTimes()
Get the number of times to emit the sample document.

### setNumberTimes

public void setNumberTimes(int numberTimes)
Set the number of times to emit the sample documents.

Parameters:
  `numberTimes` - the number of times

### getMapPath

public String getMapPath()
Return the path of the map that has the sample document.

Returns:

### setMapPath

public void setMapPath(String mapPath)
Set the path of the map that has the sample document.

Parameters:
  `mapPath` -

### getProjectArchives

public String getProjectArchives()
Get the list of project archive URLs required to access the map. See the runtime manual for details.

Returns:
  the comma-separated list of URLs.

### setProjectArchives

public void setProjectArchives(String projectArchives)
Set the list of project archive URLs required to access the map. See the runtime manual for details.

Parameters:
  `projectArchives` - a comma-separated list of URLs.

### getProjects

public String getProjects()
Get the names of the projects required to access the map. Only required if the ProjectArchives property is not set. See the runtime manual for details.

Returns:
  comma-separated list of project names.

### setProjects

public void setProjects(String projects)
Set the names of the projects required to access the map. Only required if the ProjectArchives property is not set. See the runtime manual for details.

Parameters:
  `projects` - comma-separated list of project names.

### getDevWorkspace

public String getDevWorkspace()
Get the development workspace - used for executing projects directly from the development workspace.

Returns:
  the workspace path or URL

### setDevWorkspace

public void setDevWorkspace(String devWorkspace)
Set the development workspace - used for executing projects directly from the development workspace.

### getDevInstall

public String getDevInstall()
Get the development install area - used for projects that are part of the installation.

### setDevInstall

public void setDevInstall(String devInstall)
Set the development install area - used for projects that are part of the installation.

### getLog

public String getLog()
Gets the previously set logging value. See {@link RuntimeEngine.setLogging()}.

Returns:
  the log value.

### setLog

public void setLog(String projects)
Sets the type of logging for the underlying RuntimeEngine. See {@link RuntimeEngine.setLogging()}.

Parameters:
  `log` - One of the possible log values. See {@link RuntimeEngine.setLogging()}.

### getDummy

public String getDummy()

### setDummy

public void setDummy(String dummy)

### createProducer

public org.apache.camel.Producer createProducer() throws Exception

Throws:
  `Exception`

### createConsumer

public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception

Throws:
  `Exception`

### createPollingConsumer

public org.apache.camel.PollingConsumer createPollingConsumer() throws Exception

Specified by:
  `createPollingConsumer` in interface `org.apache.camel.Endpoint`
Overrides:
  `createPollingConsumer` in class `org.apache.camel.support.DefaultEndpoint`
Throws:
  `Exception`

### getExampleDocument

protected static byte[] getExampleDocument(InputStream is) throws IOException

Throws:
  `IOException`

### isSingleton

public boolean isSingleton()

Specified by:
  `isSingleton` in interface `org.apache.camel.IsSingleton`
Overrides:
  `isSingleton` in class `org.apache.camel.support.DefaultEndpoint`