powered by Jive Software

Change openfire functionality / Re-code some modules

Hello everyone,

I am using openfire for my special purpose chating system, I am using flex as my chat client.

In my scenario, suppose

Person a1, a2, a3 belong to company a

Person b1,b2,b3 belong to company b

Now a2,a3 and b2,b3 is connected to openfire using spark client.

I dont want to allow a2 to add friend who dont belong to company a. and same for b.

And when a1 gets online, from my flex chat application, He/she will have a chat window open default.

And That chat should be connected to user a2,a3 (person from same companies)

And same for company b.

In Short, I want to modify functionalities of openfire to work in my scenario.

Please guide/help me to start with this.

I am very new to openfire. But I have good work experience in Java.

Thanks in advance.

New Chat Room:

http://community.igniterealtime.org/message/173811#173811

Openfire does not support virtual domain o multiple domain in one instance.

So in order to allow (SECURE) communication between the same company you must create to Openfire instances: a) different physical servers, b) virtual machines, c) installing two instances in the same server using tar.gz (zip), 2 x IP&DNS addresses or change ports (not easy to handle on clients).

But if your are not worried about (SECURE) and it just want a GUI “mask”, you can do this:

All users from companies must be in the same user database: a1… a100, b1 … b100. It means the same domain and therefore the same instance, they can see it each other but only after adding buddies manually.

Then create two groups: A with all a* and B with all b*.

When you start a client (i.e. Pidgin) the users on group A see at first only other members of A and the same for B members, unless you ‘share’ the group with each other in the shared group configuration tab or the user manually add the user from the other company.

Hey Guy,

Thanks for your response.

Your reply is usefull, But what I want is slightly different.

What I want is

  • I will maintain list of users and companies they belog to ( in different database tables, people will register using a registration page, which we will develop)

  • When a user gets online to chat (using chat application which we are developing), the application will send an ID to server, and using this ID server will distinguish user and his company. And server will show only selected people as online (We want to decide who will be shown online to whome).

  • When user sends a friend request on server side our logic should decide to accept/reject request.

Basically we want to decide who will be shown online to whome. and for this we need to modify openfire’s some classes (which contains logic of showing online friends).

We do not prefer doing this by using groups, because we have some future plans/extentions so we want to do this by modifying openfire.

I am enought in java, so if I can have information about which classes acts in which functionality ( e.g. xxx classes handle friend request, or yyy classes respond with online friend list, so we can place our logic in those classes, to make it wok as we need.

Also I need some Idea about how to modify and build openfire to install/run on any other system.

Thanks in advance.

I think there is a simpler approach with no modification to Openfire.

  • Make your users anonymous and associate the genenerated session JID with your user ID.
  • Use XMPP publish subscribe to control access to chats instead of presence