diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
index 826c883b7..1a93f987c 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetAdHocMultiUserChatIcqImpl.java
@@ -268,23 +268,6 @@ private AdHocChatRoom createLocalChatRoomInstance(
}
}
- /**
- * Returns true if contact supports multi user chat sessions.
- *
- * @param contact reference to the contact whose support for chat rooms we
- * are currently querying.
- * @return a boolean indicating whether contact supports chat
- * rooms.
- */
- public boolean isMultiChatSupportedByContact(Contact contact)
- {
- if (contact.getProtocolProvider().getOperationSet(
- OperationSetAdHocMultiUserChat.class) != null)
- return true;
-
- return false;
- }
-
/**
* Informs the sender of an invitation that we decline their invitation.
*
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
index 33ebcf0a3..a6fc04346 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetAdHocMultiUserChatMsnImpl.java
@@ -23,6 +23,9 @@
public class OperationSetAdHocMultiUserChatMsnImpl
implements OperationSetAdHocMultiUserChat
{
+ /**
+ * The logger used to log messages.
+ */
private static final Logger logger
= Logger.getLogger(OperationSetAdHocMultiUserChatMsnImpl.class);
@@ -67,6 +70,7 @@ public class OperationSetAdHocMultiUserChatMsnImpl
/**
* Creates an OperationSetAdHocMultiUserChatMsnImpl by specifying
* the parent provider.
+ * @param provider the Msn provider
*/
public OperationSetAdHocMultiUserChatMsnImpl(
ProtocolProviderServiceMsnImpl provider)
@@ -170,6 +174,7 @@ public Message createMessage(String messageText)
* @param adHocRoomName the name of the ad-hoc room
* @param contacts the list of contacts
*
+ * @return the ad-hoc room that has been just created
* @throws OperationFailedException
* @throws OperationNotSupportedException
*/
@@ -200,6 +205,7 @@ public AdHocChatRoom createAdHocChatRoom( String adHocRoomName,
* @param adHocRoomName the name of the ad-hoc room
* @param adHocRoomProperties the ad-hoc room's properties
*
+ * @return the created ad-hoc room
* @throws OperationFailedException
* @throws OperationNotSupportedException
*/
@@ -367,11 +373,6 @@ public boolean isGroupChatMessage(MsnSwitchboard switchboard)
}
}
- public boolean isMultiChatSupportedByContact(Contact contact)
- {
- return false;
- }
-
/**
* Removes the given listener from presence listeners' list.
*
@@ -445,6 +446,12 @@ private class MsnMessageListener
extends MsnMessageAdapter
implements MsnEmailListener
{
+ /**
+ * Indicates that an instant message has been received.
+ * @param switchboard the switchboard
+ * @param message the message
+ * @param contact the contact sending the message
+ */
public void instantMessageReceived( MsnSwitchboard switchboard,
MsnInstantMessage message,
MsnContact contact)
@@ -479,28 +486,35 @@ public void instantMessageReceived( MsnSwitchboard switchboard,
chatRoom.fireMessageEvent(msgReceivedEvent);
}
+ /**
+ * Not interested in this event.
+ */
public void initialEmailNotificationReceived(
MsnSwitchboard switchboard, MsnEmailInitMessage message,
MsnContact contact)
- {
- }
+ {}
+ /**
+ * Not interested in this event.
+ */
public void initialEmailDataReceived(MsnSwitchboard switchboard,
MsnEmailInitEmailData message, MsnContact contact)
- {
- }
+ {}
+ /**
+ * Not interested in this event.
+ */
public void newEmailNotificationReceived(MsnSwitchboard switchboard,
MsnEmailNotifyMessage message, MsnContact contact)
- {
-
- }
+ {}
+ /**
+ * Not interested in this event.
+ */
public void activityEmailNotificationReceived(
MsnSwitchboard switchboard, MsnEmailActivityMessage message,
MsnContact contact)
- {
- }
+ {}
}
/**
@@ -511,6 +525,12 @@ public void activityEmailNotificationReceived(
private class MsnSwitchboardListener
extends MsnSwitchboardAdapter
{
+ /**
+ * Indicates that the given msnContact has joined the given
+ * switchboard.
+ * @param switchboard the switchboard
+ * @param msnContact the contact that has joined
+ */
public void contactJoinSwitchboard( MsnSwitchboard switchboard,
MsnContact msnContact)
{
@@ -550,9 +570,14 @@ public void contactJoinSwitchboard( MsnSwitchboard switchboard,
{
logger.error("Failed to join switchboard.", e);
}
-
}
+ /**
+ * Indicates that the given contact has left the given
+ * switchboard.
+ * @param switchboard the switchboard
+ * @param contact the contact that has left
+ */
public void contactLeaveSwitchboard(MsnSwitchboard switchboard,
MsnContact contact)
{
@@ -563,9 +588,7 @@ public void contactLeaveSwitchboard(MsnSwitchboard switchboard,
= getLocalAdHocChatRoomInstance(switchboard);
if (chatRoom == null)
- {
- chatRoom = createLocalAdHocChatRoomInstance(switchboard);
- }
+ return;
String participantId = contact.getId();
@@ -578,6 +601,10 @@ public void contactLeaveSwitchboard(MsnSwitchboard switchboard,
}
}
+ /**
+ * Indicates that a switchboard has been closed.
+ * @param switchboard the switchboard that has been closed
+ */
public void switchboardClosed(MsnSwitchboard switchboard)
{
AdHocChatRoomMsnImpl adHocChatRoom
@@ -596,6 +623,10 @@ public void switchboardClosed(MsnSwitchboard switchboard)
}
}
+ /**
+ * Indicates that a switchboard has been started.
+ * @param switchboard the switchboard that has been started
+ */
public void switchboardStarted(MsnSwitchboard switchboard)
{
Object switchboardID = switchboard.getAttachment();
@@ -617,10 +648,6 @@ public void switchboardStarted(MsnSwitchboard switchboard)
// Add this room to the list of created chat rooms.
adHocChatRoomCache.put(switchboard, adHocChatRoom);
}
- else
- {
- logger.debug("Could not join the Ad-hoc chat room.");
- }
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
index a51385844..2797df46b 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
@@ -338,24 +338,6 @@ private AdHocChatRoomYahooImpl getLocalChatRoomInstance(
return null;
}
- /**
- * Returns true if contact supports multi user chat sessions.
- *
- * @param contact reference to the contact whose support for chat rooms we
- * are currently querying.
- * @return a boolean indicating whether contact supports chatrooms.
- * @todo Implement this
- * net.java.sip.communicator.service.protocol.OperationSetMultiUserChat
- * method
- */
- public boolean isMultiChatSupportedByContact(Contact contact)
- {
- return
- (contact.getProtocolProvider()
- .getOperationSet(OperationSetAdHocMultiUserChat.class)
- != null);
- }
-
/**
* Informs the sender of an invitation that we decline their invitation.
*
diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetAdHocMultiUserChat.java b/src/net/java/sip/communicator/service/protocol/OperationSetAdHocMultiUserChat.java
index 4c23a8b10..f53e0348f 100644
--- a/src/net/java/sip/communicator/service/protocol/OperationSetAdHocMultiUserChat.java
+++ b/src/net/java/sip/communicator/service/protocol/OperationSetAdHocMultiUserChat.java
@@ -75,16 +75,6 @@ public AdHocChatRoom createAdHocChatRoom(String adHocRoomName,
*/
public List getAdHocChatRooms();
- /**
- * Returns true if contact supports multi-user chat sessions.
- *
- * @param contact reference to the contact whose support for ad-hoc chat
- * rooms we are currently querying.
- * @return a boolean indicating whether contact supports ad-hoc
- * chat rooms.
- */
- public boolean isMultiChatSupportedByContact(Contact contact);
-
/**
* Adds a listener that will be notified of changes in our participation in
* an ad-hoc chat room such as us being joined, left.