@UriEndpoint(scheme="stream", title="Stream", syntax="stream:kind", consumerClass=StreamConsumer.class, label="file,system") public class StreamEndpoint extends org.apache.camel.impl.DefaultEndpoint
Constructor and Description |
---|
StreamEndpoint(String endpointUri)
Deprecated.
|
StreamEndpoint(String endpointUri,
org.apache.camel.Component component) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
protected org.apache.camel.Exchange |
createExchange(Object body,
long index,
boolean last) |
org.apache.camel.Producer |
createProducer() |
protected void |
doStart() |
int |
getAutoCloseCount() |
Charset |
getCharset() |
long |
getDelay() |
String |
getEncoding() |
String |
getFileName() |
int |
getGroupLines() |
GroupStrategy |
getGroupStrategy() |
long |
getInitialPromptDelay() |
String |
getKind() |
long |
getPromptDelay() |
String |
getPromptMessage() |
long |
getScanStreamDelay() |
String |
getUrl() |
boolean |
isCloseOnDone() |
boolean |
isRetry() |
boolean |
isScanStream() |
boolean |
isSingleton() |
void |
setAutoCloseCount(int autoCloseCount)
Number of messages to process before closing stream on Producer side.
|
void |
setCloseOnDone(boolean closeOnDone)
This option is used in combination with Splitter and streaming to the same file.
|
void |
setDelay(long delay)
Initial delay in milliseconds before producing the stream.
|
void |
setEncoding(String encoding)
You can configure the encoding (is a charset name) to use text-based streams (for example, message body is a String object).
|
void |
setFileName(String fileName)
When using the stream:file URI format, this option specifies the filename to stream to/from.
|
void |
setGroupLines(int groupLines)
To group X number of lines in the consumer.
|
void |
setGroupStrategy(GroupStrategy strategy)
Allows to use a custom GroupStrategy to control how to group lines.
|
void |
setInitialPromptDelay(long initialPromptDelay)
Initial delay in milliseconds before showing the message prompt.
|
void |
setKind(String kind)
Kind of stream to use such as System.in or System.out.
|
void |
setPromptDelay(long promptDelay)
Optional delay in milliseconds before showing the message prompt.
|
void |
setPromptMessage(String promptMessage)
Message prompt to use when reading from stream:in; for example, you could set this to Enter a command:
|
void |
setRetry(boolean retry)
Will retry opening the file if it's overwritten, somewhat like tail --retry
|
void |
setScanStream(boolean scanStream)
To be used for continuously reading a stream such as the unix tail command.
|
void |
setScanStreamDelay(long scanStreamDelay)
Delay in milliseconds between read attempts when using scanStream.
|
void |
setUrl(String url)
When using the stream:url URI format, this option specifies the URL to stream to/from.
|
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public StreamEndpoint(String endpointUri, org.apache.camel.Component component) throws Exception
Exception
@Deprecated public StreamEndpoint(String endpointUri)
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public boolean isSingleton()
protected org.apache.camel.Exchange createExchange(Object body, long index, boolean last)
public String getKind()
public void setKind(String kind)
public String getFileName()
public void setFileName(String fileName)
public String getUrl()
public void setUrl(String url)
public long getDelay()
public void setDelay(long delay)
public String getEncoding()
public void setEncoding(String encoding)
public String getPromptMessage()
public void setPromptMessage(String promptMessage)
public long getPromptDelay()
public void setPromptDelay(long promptDelay)
public long getInitialPromptDelay()
public void setInitialPromptDelay(long initialPromptDelay)
public boolean isScanStream()
public void setScanStream(boolean scanStream)
public GroupStrategy getGroupStrategy()
public void setGroupStrategy(GroupStrategy strategy)
public boolean isRetry()
public void setRetry(boolean retry)
public boolean isCloseOnDone()
public void setCloseOnDone(boolean closeOnDone)
public long getScanStreamDelay()
public void setScanStreamDelay(long scanStreamDelay)
public int getGroupLines()
public void setGroupLines(int groupLines)
public int getAutoCloseCount()
public void setAutoCloseCount(int autoCloseCount)
public Charset getCharset()
Apache Camel