1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.activation;
  6. import java.io.IOException;
  7. /**
  8. * JavaBeans components that are Activation Framework aware implement
  9. * this interface to find out which command verb they're being asked
  10. * to perform, and to obtain the DataHandler representing the
  11. * data they should operate on. JavaBeans that don't implement
  12. * this interface may be used as well. Such commands may obtain
  13. * the data using the Externalizable interface, or using an
  14. * application-specific method.<p>
  15. */
  16. public interface CommandObject {
  17. /**
  18. * Initialize the Command with the verb it is requested to handle
  19. * and the DataHandler that describes the data it will
  20. * operate on. <b>NOTE:</b> it is acceptable for the caller
  21. * to pass <i>null</i> as the value for <code>DataHandler</code>.
  22. *
  23. * @param verb The Command Verb this object refers to.
  24. * @param dh The DataHandler.
  25. */
  26. public void setCommandContext(String verb, DataHandler dh)
  27. throws IOException;
  28. }