Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.synaptics.elvis
Class ElvisMessageFactory  view ElvisMessageFactory download ElvisMessageFactory.java

java.lang.Object
  extended bycom.synaptics.elvis.ElvisMessageFactory
All Implemented Interfaces:
java.io.Serializable

final class ElvisMessageFactory
extends java.lang.Object
implements java.io.Serializable

The ElvisMessageFactory is just a handy utility for assembling ElvisMessages.

Version:
$Id: ElvisMessageFactory.java,v 1.1 2002/05/09 07:17:17 clheiny Exp $

Field Summary
private  java.lang.String key
          Holds value of property key.
private  java.lang.String program
          Holds value of property program.
private  java.beans.PropertyChangeSupport propertySupport
           
 
Constructor Summary
ElvisMessageFactory(java.lang.String program, java.lang.String key)
          Creates new ElvisMessageFactory for the specified program and key.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 java.lang.String getKey()
          Return the key associated with this message factory.
 java.lang.String getProgram()
          Return the program name associated with this message factory.
 ElvisMessage newMessage(ElvisRequest request, java.lang.String data)
          Create a new message corresponding to the given request, with the specified data field.
 ElvisMessage newMessage(ElvisResponse response, java.lang.String data)
          Create a new message corresponding to the given response, with the specified data field.
 ElvisMessage newMessage(java.lang.String keyword, java.lang.String data)
          Create a new message with the specified keyword and data.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertySupport

private java.beans.PropertyChangeSupport propertySupport

program

private java.lang.String program
Holds value of property program.


key

private java.lang.String key
Holds value of property key.

Constructor Detail

ElvisMessageFactory

public ElvisMessageFactory(java.lang.String program,
                           java.lang.String key)
Creates new ElvisMessageFactory for the specified program and key.

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

getProgram

public java.lang.String getProgram()
Return the program name associated with this message factory.


getKey

public java.lang.String getKey()
Return the key associated with this message factory.


newMessage

public ElvisMessage newMessage(java.lang.String keyword,
                               java.lang.String data)
Create a new message with the specified keyword and data.


newMessage

public ElvisMessage newMessage(ElvisResponse response,
                               java.lang.String data)
Create a new message corresponding to the given response, with the specified data field.


newMessage

public ElvisMessage newMessage(ElvisRequest request,
                               java.lang.String data)
Create a new message corresponding to the given request, with the specified data field.