public class TwitterDispatcher extends RateLimitedDispatcher
Modifier and Type | Class and Description |
---|---|
static class |
TwitterDispatcher.NoCredentialsException
Indicates that the user did not supply their credentials.
|
static class |
TwitterDispatcher.NotConfiguredException
Indicates that the dispatcher has not been configured with service
credentials.
|
Modifier and Type | Field and Description |
---|---|
static String |
ACCESS_SECRET_PROP |
static String |
ACCESS_TOKEN_PROP |
static char |
ELLIPSIS |
static int |
MAX_MESSAGE_LENGTH |
log
Constructor and Description |
---|
TwitterDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(String messageSubject,
String messageContent,
String targetParameter)
Dispatch a message to a recipient that doesn't care what produced it.
|
String |
getName() |
boolean |
isAvailable() |
void |
setAccessSecret(String secret) |
void |
setAccessToken(String token) |
dispatch, isSendAllowed, setCooldownSeconds
public static final int MAX_MESSAGE_LENGTH
public static final char ELLIPSIS
public static final String ACCESS_TOKEN_PROP
public static final String ACCESS_SECRET_PROP
public String getName()
public void setAccessToken(String token)
public void setAccessSecret(String secret)
public void dispatch(String messageSubject, String messageContent, String targetParameter) throws Exception
RateLimitedDispatcher
dispatch
in class RateLimitedDispatcher
messageSubject
- The subject of the message to send.messageContent
- The plain-text content of the message to send.targetParameter
- A description of where it is to go.Exception
- If anything goes wrong.public boolean isAvailable()
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.