Martin Zruban wrote: > Bernd Fondermann napsal(a): >> 2009/8/15 Martin Zruban <[email protected]>: >> >>> Hi, >>> >>> I recently came across the Vysper project and I was thinking about >>> implementing a gateway for other IM protocols. To be precise, I thought >>> about implementing it as the XEP-0100 extension [1] and I considered >>> inspiring myself with Kraken IM plugin for Openfire [2] . Since I'm >>> new to >>> Vysper, I'd like to ask: >>> Has anyone tried or considered implementing the gateway, if so, any >>> tips? >>> Is it the right approach to try implementing it as a XEP? >>> >> >> I'd propose a different approach. >> >> At first, we are talking about proxying non-XMPP client messages to a >> XMPP server here. >> This involves translating a third-party client behavior into 'proper' >> XMPP. You have to re-write Vysper's "stanza frontend". >> Handlers, which are the essence of our XEP architecture, instead deal >> with XMPP stanzas only. >> >> But there is another way to tackle this. Please look into >> org.apache.vysper.stanzasession.StanzaSessionContext >> It's another way besides the 'standard' MINA based session context >> which is parsing the XMPP line protocol >> Just like this class you can write your own SessionContext frontend >> (or extend what's already there), generate stanzas from the protocol >> you want to provide a gateway for and inject them into Vysper. >> >> This is for starters. Do you find this helpful? >> If you have more questions, please keep asking. >> >> What's the protocol you want a gateway for? >> >> Just a quick note at the end. Everything you contribute must be your >> own code. Inspiration and reverse engineering is ok, of course, >> verbatim copies of code are problematic. >> >> Have fun, >> >> Bernd >> >> > Not sure if we're on the same page here. You mentioned translating > non-XMPP client messages to XMPP server. What I meant was, translating > XMPP messages (from client) to a > non-XMPP server. E.g., jabberclient > ---XMPP--->vysper.org---TOC2--->login.oscar.aol.com. > It should work as a service for people who have a jabber client and want > to communicate with non-XMPP servers (I want to implement ICQ support). > What you mentioned might work when the gateway module is communicating > with non-XMPP server. > > Thanks, > Martin
ok, you are right. I was on the wrong track. Sorry 'bout that. Currently, Vysper is unable to communicate with anything else than XMPP clients. Especially, it does not provide Vysper2Vysper or even Vysper2OtherXMPPServer federation including gateways, as you already noticed. Anyway, I think I should point you into the StanzaRelay corner of Vysper. Handlers send out outgoing stanzas using StanzaRelay implementations they retrieve via their context. In case a stanza is going to another server, the stanza should land in org.apache.vysper.xmpp.delivery.StanzaRelayBroker.relay() see [1]. A dedicated StanzaRelay instance is used for external relay (federation, gateways). Is this helping you more? Bernd [1] http://svn.apache.org/repos/asf/mina/sandbox/vysper/trunk/server/core/src/main/java/org/apache/vysper/xmpp/delivery/StanzaRelayBroker.java
