org.zerofun.maven.im.beans
Class JabberMessageBean

java.lang.Object
  |
  +--org.zerofun.maven.im.beans.JabberMessageBean

public class JabberMessageBean
extends java.lang.Object

This bean provides the actual functionality for sending a message to XMPP (Jabber) clients. It's functionality is invoked by the corresponding JabberMessageTag class.

Version:
$Revision: 1.4 $
Author:
Sam Mulube

Constructor Summary
JabberMessageBean()
           
 
Method Summary
 void execute()
          The main method of the bean.
 java.lang.String getFrom()
          Gets the username of the sender of the message.
 java.lang.String getHost()
          Gets the host/server to which the specified user can connect to.
 java.lang.String getMessage()
          Gets the message which will be sent to all recipients.
 java.lang.String getPassword()
          Gets the password which corresponds to the specified username, which will be used to log the user into the server.
 int getPort()
          Gets the port to which the plugin should attempt to connect on the specified server.
 int getSecurePort()
          Gets the port to which the plugin should attempt to connect if it is trying to connect using XMPP secure.
 java.lang.String getTo()
          Gets the complete string containing all recipients of the message.
 boolean isSecure()
          Gets a boolean value indicating whether or not secure XMPP should be used to send the message.
 void setFrom(java.lang.String from)
          Sets the username which identifies the user the messages will be sent from.
 void setHost(java.lang.String host)
          Sets the server the plugin will attempt to connect to, to send messages.
 void setMessage(java.lang.String message)
          Sets the message which will be sent to all recipients.
 void setPassword(java.lang.String password)
          Sets the password which will be used to authenticate the specified user when the plugin connects to the server.
 void setPort(int port)
          Sets the port the plugin will attempt to use when connecting to the XMPP server.
 void setSecure(boolean secure)
          Sets the boolean value which indicates whether or not the messages should be sent using XMPP Secure or not.
 void setSecurePort(int securePort)
          Sets the port the plugin will attempt to use when connecting to the XMPP server using an encrypted connection.
 void setTo(java.lang.String to)
          Sets the string containing all of the intended recipients of the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JabberMessageBean

public JabberMessageBean()
Method Detail

execute

public void execute()
             throws java.lang.Exception
The main method of the bean. This performs the function of creating and sending the message to all Jabber recipients.

Throws:
java.lang.Exception

getFrom

public java.lang.String getFrom()
Gets the username of the sender of the message. This username is used to log into the XMPP server.

Returns:
the from String

getHost

public java.lang.String getHost()
Gets the host/server to which the specified user can connect to. This server is then used to send the messages.

Returns:
the host String

getMessage

public java.lang.String getMessage()
Gets the message which will be sent to all recipients.

Returns:
the message String

getPassword

public java.lang.String getPassword()
Gets the password which corresponds to the specified username, which will be used to log the user into the server.

Returns:
the password String

getPort

public int getPort()
Gets the port to which the plugin should attempt to connect on the specified server.

Returns:
the port number int

getSecurePort

public int getSecurePort()
Gets the port to which the plugin should attempt to connect if it is trying to connect using XMPP secure.

Returns:
the secure port number int

getTo

public java.lang.String getTo()
Gets the complete string containing all recipients of the message. This could be a single name, or a comma separated list of recipients.

Returns:
the recipients String

isSecure

public boolean isSecure()
Gets a boolean value indicating whether or not secure XMPP should be used to send the message.

Returns:
the secure boolean value

setFrom

public void setFrom(java.lang.String from)
Sets the username which identifies the user the messages will be sent from.

Parameters:
from - the username String to set

setHost

public void setHost(java.lang.String host)
Sets the server the plugin will attempt to connect to, to send messages.

Parameters:
host - the server String to set

setMessage

public void setMessage(java.lang.String message)
Sets the message which will be sent to all recipients.

Parameters:
message - the message String to set

setPassword

public void setPassword(java.lang.String password)
Sets the password which will be used to authenticate the specified user when the plugin connects to the server.

Parameters:
password - the password String to set

setPort

public void setPort(int port)
Sets the port the plugin will attempt to use when connecting to the XMPP server.

Parameters:
port - the port number int to set

setSecure

public void setSecure(boolean secure)
Sets the boolean value which indicates whether or not the messages should be sent using XMPP Secure or not.

Parameters:
secure - the secure boolean value to set

setSecurePort

public void setSecurePort(int securePort)
Sets the port the plugin will attempt to use when connecting to the XMPP server using an encrypted connection.

Parameters:
securePort - the secure port number int to set

setTo

public void setTo(java.lang.String to)
Sets the string containing all of the intended recipients of the message. This can be a single name, or a comma separated list.

Parameters:
to - the to String to set


Copyright © 2003 Zerofun Software. All Rights Reserved.