Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface OperationSetAdHocMultiUserChat

All Superinterfaces:
OperationSet
All Known Implementing Classes:
OperationSetAdHocMultiUserChatIcqImpl, OperationSetAdHocMultiUserChatMsnImpl, OperationSetAdHocMultiUserChatYahooImpl

public interface OperationSetAdHocMultiUserChat
extends OperationSet

Allows creating, configuring, joining and administering of individual text-based ad-hoc conference rooms.

Author:
Valentin Martinet

Method Summary
 void addInvitationListener(AdHocChatRoomInvitationListener listener)
          Adds the given listener to the list of AdHocChatRoomInvitationListener-s that would be notified when an add-hoc chat room invitation has been received.
 void addInvitationRejectionListener(AdHocChatRoomInvitationRejectionListener listener)
          Adds the given listener to the list of AdHocChatRoomInvitationRejectionListener-s that would be notified when an add-hoc chat room invitation has been rejected.
 void addPresenceListener(LocalUserAdHocChatRoomPresenceListener listener)
          Adds a listener that will be notified of changes in our participation in an ad-hoc chat room such as us being joined, left.
 AdHocChatRoom createAdHocChatRoom(String adHocRoomName, List<String> contacts, String reason)
          Creates an ad-hoc room with the named adHocRoomName and in including to the specified contacts for the given reason .
 AdHocChatRoom createAdHocChatRoom(String adHocRoomName, Map<String,Object> adHocRoomProperties)
          Creates an ad-hoc room with the named adHocRoomName and according to the specified adHocRoomProperties.
 List<AdHocChatRoom> getAdHocChatRooms()
          Returns a list of all currently joined AdHocChatRoom-s.
 void rejectInvitation(AdHocChatRoomInvitation invitation, String rejectReason)
          Informs the sender of an invitation that we decline their invitation.
 void removeInvitationListener(AdHocChatRoomInvitationListener listener)
          Removes listener from the list of invitation listeners registered to receive invitation events.
 void removeInvitationRejectionListener(AdHocChatRoomInvitationRejectionListener listener)
          Removes the given listener from the list of invitation listeners registered to receive events every time an invitation has been rejected.
 void removePresenceListener(LocalUserAdHocChatRoomPresenceListener listener)
          Removes a listener that was being notified of changes in our participation in an ad-hoc room such as us being joined, left.
 

Method Detail

createAdHocChatRoom

AdHocChatRoom createAdHocChatRoom(String adHocRoomName,
                                  Map<String,Object> adHocRoomProperties)
                                  throws OperationFailedException,
                                         OperationNotSupportedException
Creates an ad-hoc room with the named adHocRoomName and according to the specified adHocRoomProperties. When the method returns the ad-hoc room the local user will have joined it.

Parameters:
adHocRoomName - the name of the AdHocChatRoom to create.
adHocRoomProperties - properties specifying how the ad-hoc room should be created; null for no properties just like an empty Map
Returns:
the newly created AdHocChatRoom named roomName.
Throws:
OperationFailedException - if the ad-hoc room couldn't be created for some reason.
OperationNotSupportedException - if chat room creation is not supported by this server

createAdHocChatRoom

AdHocChatRoom createAdHocChatRoom(String adHocRoomName,
                                  List<String> contacts,
                                  String reason)
                                  throws OperationFailedException,
                                         OperationNotSupportedException
Creates an ad-hoc room with the named adHocRoomName and in including to the specified contacts for the given reason . When the method returns the ad-hoc room the local user will have joined it.

Parameters:
adHocRoomName - the name of the AdHocChatRoom to create.
contacts - the contacts (ID) who are added to the room when it's created; null for no contacts
reason - the reason for this invitation
Returns:
the newly created AdHocChatRoom named roomName.
Throws:
OperationFailedException - if the ad-hoc room couldn't be created for some reason.
OperationNotSupportedException - if chat room creation is not supported by this server

getAdHocChatRooms

List<AdHocChatRoom> getAdHocChatRooms()
Returns a list of all currently joined AdHocChatRoom-s.

Returns:
a list of all currently joined AdHocChatRoom-s

addPresenceListener

void addPresenceListener(LocalUserAdHocChatRoomPresenceListener listener)
Adds a listener that will be notified of changes in our participation in an ad-hoc chat room such as us being joined, left.

Parameters:
listener - a local user participation listener.

removePresenceListener

void removePresenceListener(LocalUserAdHocChatRoomPresenceListener listener)
Removes a listener that was being notified of changes in our participation in an ad-hoc room such as us being joined, left.

Parameters:
listener - a local user participation listener.

addInvitationListener

void addInvitationListener(AdHocChatRoomInvitationListener listener)
Adds the given listener to the list of AdHocChatRoomInvitationListener-s that would be notified when an add-hoc chat room invitation has been received.

Parameters:
listener - the AdHocChatRoomInvitationListener to add

removeInvitationListener

void removeInvitationListener(AdHocChatRoomInvitationListener listener)
Removes listener from the list of invitation listeners registered to receive invitation events.

Parameters:
listener - the invitation listener to remove.

addInvitationRejectionListener

void addInvitationRejectionListener(AdHocChatRoomInvitationRejectionListener listener)
Adds the given listener to the list of AdHocChatRoomInvitationRejectionListener-s that would be notified when an add-hoc chat room invitation has been rejected.

Parameters:
listener - the AdHocChatRoomInvitationListener to add

removeInvitationRejectionListener

void removeInvitationRejectionListener(AdHocChatRoomInvitationRejectionListener listener)
Removes the given listener from the list of invitation listeners registered to receive events every time an invitation has been rejected.

Parameters:
listener - the invitation listener to remove.

rejectInvitation

void rejectInvitation(AdHocChatRoomInvitation invitation,
                      String rejectReason)
Informs the sender of an invitation that we decline their invitation.

Parameters:
invitation - the invitation we are rejecting.
rejectReason - the reason to reject the invitation (optional)

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.