com.jthomas.mailfaces
Class FaceExit

java.lang.Object
  |
  +--com.jthomas.mailfaces.FaceExit

public class FaceExit
extends java.lang.Object

FaceExit is an example of an exit that can be specified by the user to handle specific requirements.

It is given control from the FaceSelect.selectImage method when a Selection statement is matched that contains the keyword "exit" or "exit(class)".

This example will allow the user to send an email with the subject set to "set sms=on" or "set sms=off" to change the SMS active option. It would require a faces.opt statement like:

  DefaultExit "com.jthomas.mailfaces.FaceExit"
  Select sender "me@myisp.com"	"file:./images/me.gif" exit
 

To replace this exit with your own code:
- extend this class and replace the process method with your own code
- change the classpath to pickup your class file.
- change the "DefaultExit" statement in the faces.opt file or specify it on the exit keyword in the Select statement.

    ...
    public class MyFaceExit extends com.jthomas.mailfaces.FaceExit {
    ...
    
   DefaultExit  MyFaceExit 
 

Author:
John Thomas
Constructor Summary
FaceExit()
          Default constructor for FaceExit.
 
Method Summary
 void process(Mailmsg mailmsg, FaceSelection selection)
          process the specified Mailmsg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FaceExit

public FaceExit()
Default constructor for FaceExit. It will processs the Options, ask to be informed if the options change, .

Method Detail

process

public void process(Mailmsg mailmsg,
                    FaceSelection selection)
process the specified Mailmsg. This example of a FaceExit class will allow the user to turn on or off the SMS option by sending it email with the subject = "set sms on/off" So if the user forgets to set the option before they leave the desktop, they could send it as a remote mail to change the option.

Parameters:
mailmsg - The instance of Mailmsg
selection - The instance of the Select statement that contained the exit parameter
Returns:
void