FileDocCategorySizeDatePackage
ServiceRequestEvent.javaAPI DocExample947Tue Jun 03 23:55:48 BST 1997BeansBook.Simulator

ServiceRequestEvent.java

// This example is from the book Developing Java Beans by Robert Englander. 
// Copyright (c) 1997 O'Reilly & Associates.
// You may study, use, modify, and distribute this example for any purpose.
// This example is provided WITHOUT WARRANTY either expressed or implied.

// Chapter 8 -- The ServiceRequestEvent class

package BeansBook.Simulator;

// the service request event class
public class ServiceRequestEvent
        extends java.util.EventObject
{
   // true if the request is to start the service
   protected boolean bStart;
   
   // constructor
   public ServiceRequestEvent(Object source, boolean start)
   {
      // call the superclass constructor
      super(source);
      
      // save the value of the start flag
      bStart = start;
   }
   
   // determine if the request is to start the service
   public boolean isStart()
   {
      // return the start value
      return bStart;
   }
}