net.sourceforge.cruisecontrol.publishers
Class JabberPublisher

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.publishers.JabberPublisher
All Implemented Interfaces:
Publisher, java.io.Serializable
Direct Known Subclasses:
LinkJabberPublisher

public abstract class JabberPublisher
extends java.lang.Object
implements Publisher

Abstract publisher which establishes this transport to publish build results via Jabber Instant Messaging framework.

Version:
1.0
Author:
Jonas Edgeworth
See Also:
LinkJabberPublisher, Serialized Form

Constructor Summary
JabberPublisher()
           
 
Method Summary
protected abstract  java.lang.String createMessage(XMLLogHelper logHelper)
          Creates the IM message body to be sent to the recipient.
protected  void init()
          Initialize the XMPPConnection to the Jabber server and create the necessary chat session to send a message.
 void publish(org.jdom.Element cruisecontrolLog)
          Publish the results to the Jabber transport via an instant message.
 void setChatroom(boolean chatroom)
           
 void setHost(java.lang.String host)
           
 void setPassword(java.lang.String password)
           
 void setPort(int port)
           
 void setRecipient(java.lang.String recipient)
           
 void setService(java.lang.String service)
           
 void setSsl(boolean ssl)
           
 void setUsername(java.lang.String username)
           
 void validate()
          Validate that all the mandatory parameters were specified in order to properly initial the Jabber client service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JabberPublisher

public JabberPublisher()
Method Detail

setHost

public void setHost(java.lang.String host)

setPort

public void setPort(int port)

setUsername

public void setUsername(java.lang.String username)

setPassword

public void setPassword(java.lang.String password)

setRecipient

public void setRecipient(java.lang.String recipient)

setService

public void setService(java.lang.String service)

setChatroom

public void setChatroom(boolean chatroom)

setSsl

public void setSsl(boolean ssl)

init

protected void init()
Initialize the XMPPConnection to the Jabber server and create the necessary chat session to send a message.


validate

public void validate()
              throws CruiseControlException
Validate that all the mandatory parameters were specified in order to properly initial the Jabber client service. Note that this is called after the configuration file is read.

Specified by:
validate in interface Publisher
Throws:
CruiseControlException - if there was a configuration error.

publish

public void publish(org.jdom.Element cruisecontrolLog)
             throws CruiseControlException
Publish the results to the Jabber transport via an instant message.

Specified by:
publish in interface Publisher
Parameters:
cruisecontrolLog -
Throws:
CruiseControlException

createMessage

protected abstract java.lang.String createMessage(XMLLogHelper logHelper)
                                           throws CruiseControlException
Creates the IM message body to be sent to the recipient.

Returns:
String that makes up the body of the IM message
Throws:
CruiseControlException