Comments and style.

fix-message-formatting
Danny van Heumen 11 years ago
parent d51ea69014
commit e592fd1a06

@ -7,6 +7,12 @@
import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.service.protocol.*;
/**
* Implementation of Basic Instant Messaging as utilized for IRC private
* user-to-user messaging.
*
* @author Danny van Heumen
*/
public class OperationSetBasicInstantMessagingIrcImpl public class OperationSetBasicInstantMessagingIrcImpl
extends AbstractOperationSetBasicInstantMessaging extends AbstractOperationSetBasicInstantMessaging
{ {
@ -17,30 +23,33 @@ public class OperationSetBasicInstantMessagingIrcImpl
/** /**
* Constructor. * Constructor.
* *
* @param provider IRC provider service. * @param provider IRC provider service.
*/ */
public OperationSetBasicInstantMessagingIrcImpl( public OperationSetBasicInstantMessagingIrcImpl(
ProtocolProviderServiceIrcImpl provider) final ProtocolProviderServiceIrcImpl provider)
{ {
if (provider == null) if (provider == null)
{
throw new IllegalArgumentException("provider cannot be null"); throw new IllegalArgumentException("provider cannot be null");
}
this.provider = provider; this.provider = provider;
} }
/** /**
* Create a new message. * Create a new message.
* *
* {@inheritDoc} * {@inheritDoc}
* *
* @param content Message content * @param content Message content
* @param contentType Message content type * @param contentType Message content type
* @param contentEncoding message encoding * @param contentEncoding message encoding
* @param subject Message subject * @param subject Message subject
*/ */
@Override @Override
public MessageIrcImpl createMessage(String content, String contentType, public MessageIrcImpl createMessage(final String content,
String contentEncoding, String subject) final String contentType, final String contentEncoding,
final String subject)
{ {
return new MessageIrcImpl(content, contentType, contentEncoding, return new MessageIrcImpl(content, contentType, contentEncoding,
subject); subject);
@ -48,7 +57,7 @@ public MessageIrcImpl createMessage(String content, String contentType,
/** /**
* Send instant message. * Send instant message.
* *
* @param to contact to send message to * @param to contact to send message to
* @param message message to send * @param message message to send
* @throws IllegalStateException in case of bad internal state * @throws IllegalStateException in case of bad internal state
@ -77,7 +86,7 @@ public void sendInstantMessage(final Contact to, final Message message)
/** /**
* Check if offline messaging is supported. * Check if offline messaging is supported.
* *
* @return returns true if offline messaging is supported or false * @return returns true if offline messaging is supported or false
* otherwise. * otherwise.
*/ */
@ -89,14 +98,14 @@ public boolean isOfflineMessagingSupported()
/** /**
* Test content type support. * Test content type support.
* *
* {@inheritDoc} * {@inheritDoc}
* *
* @param contentType contentType to test * @param contentType contentType to test
* @return returns true if content type is supported * @return returns true if content type is supported
*/ */
@Override @Override
public boolean isContentTypeSupported(String contentType) public boolean isContentTypeSupported(final String contentType)
{ {
return OperationSetBasicInstantMessaging.HTML_MIME_TYPE return OperationSetBasicInstantMessaging.HTML_MIME_TYPE
.equalsIgnoreCase(contentType); .equalsIgnoreCase(contentType);
@ -104,38 +113,38 @@ public boolean isContentTypeSupported(String contentType)
/** /**
* {@inheritDoc} * {@inheritDoc}
* *
* @param message the received message * @param message the received message
* @param contactId the sender * @param from the sender
*/ */
@Override @Override
protected void fireMessageReceived(Message message, Contact from) protected void fireMessageReceived(final Message message, final Contact from)
{ {
super.fireMessageReceived(message, from); super.fireMessageReceived(message, from);
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
* *
* @param message Message that has been delivered successfully. * @param message Message that has been delivered successfully.
* @param to Contact to deliver message to. * @param to Contact to deliver message to.
*/ */
@Override @Override
protected void fireMessageDelivered(Message message, Contact to) protected void fireMessageDelivered(final Message message, final Contact to)
{ {
super.fireMessageDelivered(message, to); super.fireMessageDelivered(message, to);
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
* *
* @param message Message that was failed to deliver. * @param message Message that was failed to deliver.
* @param to Contact to deliver message to. * @param to Contact to deliver message to.
* @param errorCode Error code of failed delivery. * @param errorCode Error code of failed delivery.
*/ */
@Override @Override
protected void fireMessageDeliveryFailed(Message message, Contact to, protected void fireMessageDeliveryFailed(final Message message,
int errorCode) final Contact to, final int errorCode)
{ {
super.fireMessageDeliveryFailed(message, to, errorCode); super.fireMessageDeliveryFailed(message, to, errorCode);
} }

Loading…
Cancel
Save