org.puremvc.java.patterns.command
Class SimpleCommand

java.lang.Object
  extended by org.puremvc.java.patterns.observer.Notifier
      extended by org.puremvc.java.patterns.command.SimpleCommand
All Implemented Interfaces:
ICommand, INotifier

public class SimpleCommand
extends Notifier
implements ICommand

A base ICommand implementation.

Your subclass should override the execute method where your business logic will handle the INotification.

See Also:
Controller, Notification, MacroCommand

Field Summary
 
Fields inherited from class org.puremvc.java.patterns.observer.Notifier
facade
 
Constructor Summary
SimpleCommand()
           
 
Method Summary
 void execute(INotification notification)
          Fulfill the use-case initiated by the given INotification.
 
Methods inherited from class org.puremvc.java.patterns.observer.Notifier
sendNotification, sendNotification, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.puremvc.java.interfaces.INotifier
sendNotification, sendNotification, sendNotification
 

Constructor Detail

SimpleCommand

public SimpleCommand()
Method Detail

execute

public void execute(INotification notification)
Fulfill the use-case initiated by the given INotification.

In the Command Pattern, an application use-case typically begins with some user action, which results in an INotification being broadcast, which is handled by business logic in the execute method of an ICommand.

Specified by:
execute in interface ICommand
Parameters:
notification - the INotification to handle.