com.zion.jbuddy
Class IMessageFactory

java.lang.Object
  extended by com.zion.jbuddy.IMessageFactory

public final class IMessageFactory
extends Object

Creates new IMessage instances.

This can be used to send various messages and notices, instead of being limited to normal Instant Messages.

This class contains only factory methods. It cannot be instantiated.

Since:
2.0
See Also:
IClient.sendMessage(IMessage), IConference.sendMessage(IMessage)

Constructor Summary
IMessageFactory()
           
 
Method Summary
static IMessage factory(int type, IClient client, String recipient, RichContent richContent)
          Creates an IMessage instance using the specified arguments.
static IMessage factory(int type, IClient client, String recipient, String message)
          Creates an IMessage instance using the specified arguments.
static IMessage factory(int type, IConference conference, RichContent richContent)
          Creates an IMessage instance using the specified arguments.
static IMessage factory(int type, IConference conference, String message)
          Creates an IMessage instance using the specified arguments.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMessageFactory

public IMessageFactory()
                throws InstantiationException
Throws:
InstantiationException
Method Detail

factory

public static IMessage factory(int type,
                               IClient client,
                               String recipient,
                               RichContent richContent)
                        throws Exception
Creates an IMessage instance using the specified arguments.

The IMessage's getSeqNum method will return -1 until the message has been successfully sent through IClient.sendMessage.

Parameters:
type - the message's type (from IMessage constants)
client - the client for which the message is to be created
recipient - the unique name for the user that is to receive the message
richContent - the contents of the message
Returns:
the message, or null if the request could not be met
Throws:
Exception
Since:
5.0

factory

public static IMessage factory(int type,
                               IClient client,
                               String recipient,
                               String message)
                        throws Exception
Creates an IMessage instance using the specified arguments.

The IMessage's getSeqNum method will return -1 until the message has been successfully sent through IClient.sendMessage.

Parameters:
type - the message's type (from IMessage constants)
client - the client for which the message is to be created
recipient - the unique name for the user that is to receive the message
message - the contents of the message
Returns:
the message, or null if the request could not be met
Throws:
Exception

factory

public static IMessage factory(int type,
                               IConference conference,
                               RichContent richContent)
                        throws Exception
Creates an IMessage instance using the specified arguments. The returned message can then be sent using {IConference#sendMessage(IMessage) IConference.sendMessage}.

The IMessage's getSeqNum method will return -1 until the message has been successfully sent through {IConference#sendMessage(IMessage) IConference.sendMessage}.

Parameters:
type - the message's type (from IMessage constants)
conference - the conference the message will be sent to
richContent - the contents of the message
Returns:
the message, or null if the request could not be met
Throws:
Exception
Since:
5.0

factory

public static IMessage factory(int type,
                               IConference conference,
                               String message)
                        throws Exception
Creates an IMessage instance using the specified arguments. The returned message can then be sent using {IConference#sendMessage(IMessage) IConference.sendMessage}.

The IMessage's getSeqNum method will return -1 until the message has been successfully sent through {IConference#sendMessage(IMessage) IConference.sendMessage}.

Parameters:
type - the message's type (from IMessage constants)
conference - the conference the message will be sent to
message - the contents of the message
Returns:
the message, or null if the request could not be met
Throws:
Exception
Since:
5.0


JBuddy is a trademark of Zion Software, LLC in the US and other countries.
Copyright 2000-2012 Zion Software, LLC All Rights Reserved.