@UriEndpoint(firstVersion="1.0",
scheme="xmpp",
title="XMPP",
syntax="xmpp:host:port/participant",
alternativeSyntax="xmpp:user:password@host:port/participant",
category={CHAT,MESSAGING})
public class XmppEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.spi.HeaderFilterStrategyAware
| Constructor and Description |
|---|
XmppEndpoint() |
XmppEndpoint(String uri,
XmppComponent component) |
| Modifier and Type | Method and Description |
|---|---|
org.jivesoftware.smack.tcp.XMPPTCPConnection |
createConnection() |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createDirectProducer() |
protected String |
createEndpointUri() |
org.apache.camel.Producer |
createGroupChatProducer() |
org.apache.camel.Producer |
createPrivateChatProducer(String participant) |
org.apache.camel.Producer |
createProducer() |
org.apache.camel.Producer |
createPubSubProducer() |
protected void |
doStop() |
XmppBinding |
getBinding() |
String |
getChatId() |
org.jivesoftware.smack.ConnectionConfiguration |
getConnectionConfig() |
String |
getConnectionDescription() |
static String |
getConnectionMessage(org.jivesoftware.smack.XMPPConnection connection) |
int |
getConnectionPollDelay() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
String |
getHost() |
String |
getNickname() |
String |
getParticipant() |
String |
getPassword() |
int |
getPort() |
String |
getResource() |
String |
getRoom() |
protected String |
getRoomPassword() |
String |
getServiceName() |
String |
getUser() |
boolean |
isCreateAccount() |
boolean |
isDoc() |
boolean |
isLogin() |
boolean |
isPubsub() |
boolean |
isTestConnectionOnStartup() |
String |
resolveParticipant(org.jivesoftware.smack.XMPPConnection connection)
If there is no "@" symbol in the participant, find the service domain JID and return the fully qualified JID for
the participant as user@server.domain
|
String |
resolveRoom(org.jivesoftware.smack.XMPPConnection connection) |
void |
setBinding(XmppBinding binding)
Sets the binding used to convert from a Camel message to and from an XMPP message
|
void |
setConnectionConfig(org.jivesoftware.smack.ConnectionConfiguration connectionConfig)
To use an existing connection configuration.
|
void |
setConnectionPollDelay(int connectionPollDelay)
The amount of time in seconds between polls (in seconds) to verify the health of the XMPP connection, or between
attempts to establish an initial consumer connection.
|
void |
setCreateAccount(boolean createAccount)
If true, an attempt to create an account will be made.
|
void |
setDoc(boolean doc)
Set a doc header on the IN message containing a Document form of the incoming packet; default is true if presence
or pubsub are true, otherwise false
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.
|
void |
setHost(String host)
Hostname for the chat server
|
void |
setLogin(boolean login)
Whether to login the user.
|
void |
setNickname(String nickname)
Use nickname when joining room.
|
void |
setParticipant(String participant)
JID (Jabber ID) of person to receive messages.
|
void |
setPassword(String password)
Password for login
|
void |
setPort(int port)
Port number for the chat server
|
void |
setPubsub(boolean pubsub)
Accept pubsub packets on input, default is false
|
void |
setResource(String resource)
XMPP resource.
|
void |
setRoom(String room)
If this option is specified, the component will connect to MUC (Multi User Chat).
|
void |
setRoomPassword(String roomPassword)
Password for room
|
void |
setServiceName(String serviceName)
The name of the service you are connecting to.
|
void |
setTestConnectionOnStartup(boolean testConnectionOnStartup)
Specifies whether to test the connection on startup.
|
void |
setUser(String user)
User name (without server name).
|
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createExchange, createExchange, createPollingConsumer, doInit, doStart, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringbuild, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic XmppEndpoint()
public XmppEndpoint(String uri, XmppComponent component)
public org.apache.camel.Producer createProducer()
throws Exception
createProducer in interface org.apache.camel.EndpointExceptionpublic org.apache.camel.Producer createGroupChatProducer()
public org.apache.camel.Producer createPrivateChatProducer(String participant)
public org.apache.camel.Producer createDirectProducer()
public org.apache.camel.Producer createPubSubProducer()
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
createConsumer in interface org.apache.camel.EndpointExceptionprotected String createEndpointUri()
createEndpointUri in class org.apache.camel.support.DefaultEndpointpublic org.jivesoftware.smack.tcp.XMPPTCPConnection createConnection()
throws InterruptedException,
IOException,
org.jivesoftware.smack.SmackException,
org.jivesoftware.smack.XMPPException
InterruptedExceptionIOExceptionorg.jivesoftware.smack.SmackExceptionorg.jivesoftware.smack.XMPPExceptionpublic String resolveParticipant(org.jivesoftware.smack.XMPPConnection connection)
public String resolveRoom(org.jivesoftware.smack.XMPPConnection connection) throws InterruptedException, org.jivesoftware.smack.SmackException, org.jivesoftware.smack.XMPPException
InterruptedExceptionorg.jivesoftware.smack.SmackExceptionorg.jivesoftware.smack.XMPPExceptionpublic String getConnectionDescription()
public static String getConnectionMessage(org.jivesoftware.smack.XMPPConnection connection)
public String getChatId()
public XmppBinding getBinding()
public void setBinding(XmppBinding binding)
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public String getUser()
public void setUser(String user)
public String getPassword()
public void setPassword(String password)
public String getResource()
public void setResource(String resource)
public boolean isLogin()
public void setLogin(boolean login)
public boolean isCreateAccount()
public void setCreateAccount(boolean createAccount)
public String getRoom()
public void setRoom(String room)
public void setRoomPassword(String roomPassword)
protected String getRoomPassword()
public String getParticipant()
public void setParticipant(String participant)
public String getNickname()
public void setNickname(String nickname)
public void setServiceName(String serviceName)
public String getServiceName()
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwarepublic void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
setHeaderFilterStrategy in interface org.apache.camel.spi.HeaderFilterStrategyAwarepublic org.jivesoftware.smack.ConnectionConfiguration getConnectionConfig()
public void setConnectionConfig(org.jivesoftware.smack.ConnectionConfiguration connectionConfig)
XMPPTCPConnectionConfiguration is only supported (XMPP over TCP).public boolean isTestConnectionOnStartup()
public void setTestConnectionOnStartup(boolean testConnectionOnStartup)
public int getConnectionPollDelay()
public void setConnectionPollDelay(int connectionPollDelay)
public void setPubsub(boolean pubsub)
public boolean isPubsub()
public void setDoc(boolean doc)
public boolean isDoc()
Apache Camel