ServiceMix XMPP
Warning |
---|
|
This page is currently being reworked...Check back later. |
The ServiceMix XMPP component provides support for receiving and sending XMPP messages via the enterprise service bus.
...
Info |
---|
title | Receiver endpoint attributes |
---|
borderStyle | solidbgColor='lighblue' |
---|
|
Name | Type | Description | Default |
---|
connection host | string | sets the connection information host name or ip adress of the XMPP server | null (must be spec'd) | deleteProcessedMessages | boolean | delete mail from server when it is processed | false | processOnlyUnseenMessages | boolean | process only mails which are new (unseen) | true | marshaler | class | org.apache.servicemix.mail.marshaler.AbstractMailMarshaler | DefaultMailMarshaler | maxFetchSize | int | sets max amount of mails to fetch, -1 means no limit | -1 | debugMode | boolean | sets the debug mode for the javamail api | false | customTrustManagers | string | sets one or more custom trust managers for use with ssl | null |
|
No Format |
---|
Info |
---|
title | Poller endpoint attributes |
---|
borderStyle | solidbgColor='lighblue' |
---|
|
Name | Description |
---|
protocol | the protocol to use (example: pop3 or imap) | user | the user name used to log into an account | host | the name or ip address of the mail server | port | the port number to use (optional) | folder | the folder to poll from (optional) | password | the password for the login |
|
...
| port | int | the port number of the XMPP service | 5222 | user | String | the user name of the XMPP account | null (must be spec'd) | password | String | the password of the XMPP account | null (must be spec'd) | resource | String | the name of the resource / client | null | room | String | full room name (for example area51@conference.myserver.com) or null | null (means no room) | proxyHost | String | the hostname of the proxy to use | null | proxyPort | String | the port of the proxy to use | 3128 | proxyUser | String | the user name for the proxy to use | null | proxyPass | String | the user password for the proxy to use | null | proxyType | String | the proxy type to use (NONE, HTTP, SOCKS4, SOCKS5) | null | login | boolean | a flag if the user should login to the XMPP account | true | createAccount | boolean | a flag if an account should be created for unknown users | false | filter | class | a class which implements org.jivesoftware.smack.filter.PacketFilter | null | marshaler | class | a marshaler class which converts XMPP to NMSG | DefaultXMPPMarshaler |
|
Provider Endpoint (Sending)
...
Info |
---|
title | Sender endpoint attributes |
---|
borderStyle | solidbgColor='lighblue' |
---|
|
Name | Type | Description | Default |
---|
connection host | string | sets the connection information host name or ip adress of the XMPP server | null (must be spec'd) | sender port | string int | defines the sender address port number of the mail | no-reply@localhost | receiver | string | defines the receiver address of the mail | null | marshaler | class | org.apache.servicemix.mail.marshaler.AbstractMailMarshaler | DefaultMailMarshaler | debugMode | boolean | sets the debug mode for the javamail api | false | ignoreMessageProperties | java.util.List | a list of properties of the IN message which will be ignored | false | customProperties | java.util.Map | a map of custom properties for the connection | null | customTrustManagers | string | sets one or more custom trust managers for use with ssl | null | XMPP service | 5222 | user | String | the user name of the XMPP account | null (must be spec'd) | password | String | the password of the XMPP account | null (must be spec'd) | resource | String | the name of the resource / client | null | participant | String | the name of the person to chat with (if you specify this, leave room null) | null | room | String | full room name (if you specify this, leave participant null) | null | proxyHost | String | the hostname of the proxy to use | null | proxyPort | String | the port of the proxy to use | 3128 | proxyUser | String | the user name for the proxy to use | null | proxyPass | String | the user password for the proxy to use | null | proxyType | String | the proxy type to use (NONE, HTTP, SOCKS4, SOCKS5) | null | login | boolean | a flag if the user should login to the XMPP account | true | createAccount | boolean | a flag if an account should be created for unknown users | false | marshaler | class | a marshaler class which converts XMPP to NMSG | DefaultXMPPMarshaler |
|
For all xbean file endpoint configuration take a look at Xml schemas
...
For providing your own marshaler you only need to implement two methods:
...
toJBI(...)
This method is responsible for translating a received mail XMPP message into a jbi compliant normalized message ready to be sent to the bus.
...
fromJBI(...)
This method is responsible for translating a received normalized message into a mail XMPP message ready to be sent to the mail server.
...
Code Block |
---|
lang | xml |
---|
title | Marshaler example |
---|
|
<mail<xmpp:pollerreceiver service="test:myMailServicemyJabberService"
endpoint="receiverEndpoint"
endpointtargetService="senderEndpointtest:myJabberProcessor"
sender host="no-reply@servicemix.org"
my.jabberserver.lan"
port="5222"
connection user="imap://lhein@testserver:143?password=myPass" > "lhein"
password="myPassword"
createAccount="false"
room="smxchat@conference.my.jabberserver.lan" >
<property name="marshaler">
<bean class="com.mycompany.MyMailMarshalerMyXMPPMarshaler" />
</property>
</mailxmpp:poller>receiver>
|
Links
- Smack API the client side XMPP API
- OpenFire the GPL Jabber server