"virtual" users controlled by a component

Hallo!

I’‘m developing a plugin which is registered as a component. I have to realize interworking between xmpp and another protocol. I have to map users connected via the other protocol to wildfire but I don’'t know how to start. Can someone tell me how to make wildfire think that a specific user is online now?

I sounds a little bit like what you want to do is implement a protocol for the gateway plugin (or implement your plugin similarly to how the gateway plugin works).

I think if you looked over the source code for the gateway plugin you could determine if it would be possible to add your protocol to the list or develop your own plugin that behaves just like the gateway plugin.

When I postet this question I had no idea how openfire works. No I know much more but I am still not sure.

Let’'s say I want to fake openfire. My plugin must behaviour like a xmpp client which is conntected to my server but without real tcp-connection between plugin (gateway) and openfire. I intend to connect a client using simple to openfire. This client shell be usable like a xmpp-clients. The plugin shell work as gateway emulating a xmpp client.

The question now is how can I do this?

Can I do it exactly like a real client would do I or will this cause problems because there is no real tcp-connection?

It’‘s still difficult to understand what you’'re trying to achieve. Could you explain your requirement without referencing a particular technology?

All I can take from the question is ‘‘how do I write a SIMPLE gateway for Openfire’’ to which the answer would be ‘‘you don’‘t need to - use 1.1.0beta 2 of the gateway plug-in’’.

No, its no gateway in the way you think.

I must map a SIP-client to a virtual xmpp-client.

The result will be a server which accepts simple-client and xmpp-clients. There shell be one single account per user and the user can use simple, xmpp or both mixed.

in other word: openfire ist just the backend for an instant messaging system supporting multiple protocols

Example:

if you send a message to mike@myserver.de / sip:mike@myserver.de he will get the message when he goes online independent of the kind of client he will use. The sender need not to think about if mike will use a SIMPLE oder XMPP client.

Is there a description of the mechanisms how openfire handles and routes packets ?

Everything shell be done in 4 weeks so I need really help but I can’'t find more than javadoc

Message was edited by: FischeFr

Has really noone an idea?

I don’‘t think that’‘s possible via a gateway (as opposed to a plugin). Gateways have their own server address, which can not be the same as the openfire server’'s.

It is NO GATEWAY. It is a plugin emulating xmpp clients. These emulated clients are controlled by physical simple-clients.

I think I have to derive “virtualconnection”, create an instance of session and use the deliver-method in my derived class to process responses from the server. Is this correct?

How can I send requests to the server the best way?

P.S.: forget the first posting of this thread - “component” ist absolutely nonsense for this purpose.

My current state is

XMPPServer server = XMPPServer.getInstance();

PacketRouter router = server.getPacketRouter();

Connection connection = new VirtualClientConnection(); //own implementation

SessionManager sessionManager = server.getSessionManager();

sessionManager.createClientSession(connection);

// Authentication

//???

// Resource Binding

session.setAuthToken(new AuthToken(username), session.getAddress.getResource);

// Initial Presence

Presence presence = new Presence();

presence.setFrom(session.getAddress());

router.route(presence);

Can someone help me with the missing steps?

Problem solved

Hello FischeFr,

I am trying to accomplish something similar…

I need to set an offline user as online for several seconds.

How did you accomplish this?

Thanks.