@UriEndpoint(firstVersion="2.16.0",
scheme="slack",
title="Slack",
syntax="slack:channel",
label="social")
public class SlackEndpoint
extends org.apache.camel.impl.ScheduledPollEndpoint
Constructor and Description |
---|
SlackEndpoint(String uri,
String channelName,
SlackComponent component)
Constructor for SlackEndpoint
|
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Exchange |
createExchange(org.apache.camel.ExchangePattern pattern,
org.json.simple.JSONObject object) |
org.apache.camel.Exchange |
createExchange(org.json.simple.JSONObject object) |
org.apache.camel.Producer |
createProducer() |
String |
getChannel() |
String |
getIconEmoji() |
String |
getIconUrl() |
String |
getMaxResults() |
String |
getServerUrl() |
String |
getToken() |
String |
getUsername() |
String |
getWebhookUrl() |
boolean |
isSingleton() |
void |
setChannel(String channel)
The channel name (syntax #name) or slackuser (syntax @userName) to send a
message directly to an user.
|
void |
setIconEmoji(String iconEmoji)
Use a Slack emoji as an avatar
|
void |
setIconUrl(String iconUrl)
The avatar that the component will use when sending message to a channel
or user.
|
void |
setMaxResults(String maxResult)
The Max Result for the poll
|
void |
setServerUrl(String serverUrl)
The Server URL of the Slack instance
|
void |
setToken(String token)
The token to use
|
void |
setUsername(String username)
This is the username that the bot will have when sending messages to a
channel or user.
|
void |
setWebhookUrl(String webhookUrl)
The incoming webhook URL
|
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, initConsumerProperties, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, 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 SlackEndpoint(String uri, String channelName, SlackComponent component)
uri
- the full component urlchannelName
- the channel or username the message is directed atcomponent
- the component that was createdpublic org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public boolean isSingleton()
public void setWebhookUrl(String webhookUrl)
public String getWebhookUrl()
public String getChannel()
public void setChannel(String channel)
public String getUsername()
public void setUsername(String username)
public String getIconUrl()
public void setIconUrl(String iconUrl)
public String getIconEmoji()
public void setIconEmoji(String iconEmoji)
public String getToken()
public void setToken(String token)
public String getMaxResults()
public void setMaxResults(String maxResult)
public String getServerUrl()
public void setServerUrl(String serverUrl)
public org.apache.camel.Exchange createExchange(org.json.simple.JSONObject object)
public org.apache.camel.Exchange createExchange(org.apache.camel.ExchangePattern pattern, org.json.simple.JSONObject object)
Apache Camel