org.apache.camel.component.xmpp
Class XmppEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by org.apache.camel.component.xmpp.XmppEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, HeaderFilterStrategyAware

public class XmppEndpoint
extends DefaultEndpoint
implements HeaderFilterStrategyAware

A XMPP Endpoint

Version:
$Revision:520964 $

Constructor Summary
XmppEndpoint()
           
XmppEndpoint(String endpointUri)
           
XmppEndpoint(String uri, XmppComponent component)
           
 
Method Summary
 org.jivesoftware.smack.XMPPConnection createConnection()
           
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
protected  String createEndpointUri()
          A factory method to lazily create the endpointUri if none is specified
 Exchange createExchange(ExchangePattern pattern)
          Create a new exchange for communicating with this endpoint with the specified ExchangePattern such as whether its going to be an ExchangePattern.InOnly or ExchangePattern.InOut exchange
 Exchange createExchange(org.jivesoftware.smack.packet.Message message)
           
 Producer createGroupChatProducer()
           
 Producer createPrivateChatProducer(String participant)
           
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
protected  void destroy()
           
 XmppBinding getBinding()
           
 String getChatId()
           
static String getConnectionMessage(org.jivesoftware.smack.XMPPConnection connection)
           
 HeaderFilterStrategy getHeaderFilterStrategy()
          Gets the header filter strategy used
 String getHost()
           
 String getNickname()
           
 String getParticipant()
           
 String getPassword()
           
 int getPort()
           
 String getResource()
           
 String getRoom()
           
 String getServiceName()
           
 String getUser()
           
 boolean isCreateAccount()
           
 boolean isLogin()
           
 boolean isSingleton()
          Wheter this class supports being singleton or not.
 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 setCreateAccount(boolean createAccount)
           
 void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy)
          Sets the header filter strategy to use
 void setHost(String host)
           
 void setLogin(boolean login)
           
 void setNickname(String nickname)
           
 void setParticipant(String participant)
           
 void setPassword(String password)
           
 void setPort(int port)
           
 void setResource(String resource)
           
 void setRoom(String room)
           
 void setServiceName(String serviceName)
           
 void setUser(String user)
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createExchange, createExchange, createPollingConsumer, createScheduledExecutorService, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getExecutorService, getScheduledExecutorService, hashCode, isLenientProperties, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setExecutorService, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmppEndpoint

public XmppEndpoint()

XmppEndpoint

public XmppEndpoint(String uri,
                    XmppComponent component)

XmppEndpoint

public XmppEndpoint(String endpointUri)
Method Detail

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Specified by:
createProducer in interface Endpoint
Returns:
a newly created producer
Throws:
Exception - can be thrown

createGroupChatProducer

public Producer createGroupChatProducer()
                                 throws Exception
Throws:
Exception

createPrivateChatProducer

public Producer createPrivateChatProducer(String participant)
                                   throws Exception
Throws:
Exception

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

createExchange

public Exchange createExchange(ExchangePattern pattern)
Description copied from interface: Endpoint
Create a new exchange for communicating with this endpoint with the specified ExchangePattern such as whether its going to be an ExchangePattern.InOnly or ExchangePattern.InOut exchange

Specified by:
createExchange in interface Endpoint
Overrides:
createExchange in class DefaultEndpoint
Parameters:
pattern - the message exchange pattern for the exchange
Returns:
a new exchange

createExchange

public Exchange createExchange(org.jivesoftware.smack.packet.Message message)

createEndpointUri

protected String createEndpointUri()
Description copied from class: DefaultEndpoint
A factory method to lazily create the endpointUri if none is specified

Overrides:
createEndpointUri in class DefaultEndpoint

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Wheter this class supports being singleton or not.

Specified by:
isSingleton in interface IsSingleton
Returns:
true to be a single shared instance, false to create new instances.

createConnection

public org.jivesoftware.smack.XMPPConnection createConnection()
                                                       throws org.jivesoftware.smack.XMPPException
Throws:
org.jivesoftware.smack.XMPPException

resolveRoom

public String resolveRoom(org.jivesoftware.smack.XMPPConnection connection)
                   throws org.jivesoftware.smack.XMPPException
Throws:
org.jivesoftware.smack.XMPPException

getConnectionMessage

public static String getConnectionMessage(org.jivesoftware.smack.XMPPConnection connection)

getChatId

public String getChatId()

destroy

protected void destroy()
                throws Exception
Throws:
Exception

getBinding

public XmppBinding getBinding()

setBinding

public void setBinding(XmppBinding binding)
Sets the binding used to convert from a Camel message to and from an XMPP message


getHost

public String getHost()

setHost

public void setHost(String host)

getPort

public int getPort()

setPort

public void setPort(int port)

getUser

public String getUser()

setUser

public void setUser(String user)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getResource

public String getResource()

setResource

public void setResource(String resource)

isLogin

public boolean isLogin()

setLogin

public void setLogin(boolean login)

isCreateAccount

public boolean isCreateAccount()

setCreateAccount

public void setCreateAccount(boolean createAccount)

getRoom

public String getRoom()

setRoom

public void setRoom(String room)

getParticipant

public String getParticipant()

setParticipant

public void setParticipant(String participant)

getNickname

public String getNickname()

setNickname

public void setNickname(String nickname)

setServiceName

public void setServiceName(String serviceName)

getServiceName

public String getServiceName()

getHeaderFilterStrategy

public HeaderFilterStrategy getHeaderFilterStrategy()
Description copied from interface: HeaderFilterStrategyAware
Gets the header filter strategy used

Specified by:
getHeaderFilterStrategy in interface HeaderFilterStrategyAware
Returns:
the strategy

setHeaderFilterStrategy

public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy)
Description copied from interface: HeaderFilterStrategyAware
Sets the header filter strategy to use

Specified by:
setHeaderFilterStrategy in interface HeaderFilterStrategyAware
Parameters:
headerFilterStrategy - the strategy


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.