gcs
Class GcsMessageFactory

java.lang.Object
  extended by gcs.GcsMessageFactory
Direct Known Subclasses:
SpreadGcsMessageFactory

public abstract class GcsMessageFactory
extends java.lang.Object

Using an GcsMessageFactory object, a number of the same messages as one given by the argument of the constructor or with setDefault(GcsMessage) can be produced. To create new message createMessage() should be called.

Author:
tkob

Constructor Summary
protected GcsMessageFactory(GcsMessage message)
          Constructor.
 
Method Summary
abstract  GcsMessage createMessage()
          Creates new message, a copy of the default message.
abstract  void setDefault(GcsMessage message)
          Sets the new default message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GcsMessageFactory

protected GcsMessageFactory(GcsMessage message)
Constructor. messages given by the arguemnt will be copied every time the createMessage() is called. The default message can be changed with setDefault(GcsMessage).

Parameters:
message -
Method Detail

createMessage

public abstract GcsMessage createMessage()
Creates new message, a copy of the default message.

Returns:
a copy of the default message

setDefault

public abstract void setDefault(GcsMessage message)
Sets the new default message.

Parameters:
message - the new default message