javax.activation
Interface CommandObject
--------------------------------------------------------------------------------
public interface CommandObject
Activation Framework 所知的 JavaBean 组件实现此接口,以找出请求这些组件执行的命令动词,并获取表示这些组件要操作的数据的 DataHandler。不实现此接口的 JavaBean 也同样可以使用。这类命令可以使用 Externalizable 接口或特定于应用程序的方法来获取数据。
英文文档:
JavaBeans components that are Activation Framework aware implement this interface to find out which command verb they're being asked to perform, and to obtain the DataHandler representing the data they should operate on. JavaBeans that don't implement this interface may be used as well. Such commands may obtain the data using the Externalizable interface, or using an application-specific method.
--------------------------------------------------------------------------------
Method Summary
void setCommandContext(String verb, DataHandler dh)
Initialize the Command with the verb it is requested to handle and the DataHandler that describes the data it will operate on.
Method Detail
public void setCommandContext(String verb, DataHandler dh) throws java.io.IOException
用请求处理的动词和描述将要操作的数据的 DataHandler 来初始化 Command。注:调用者为 DataHandler 传递 null 值是可以接受的。 verb 此对象引用的 Command Verb。
dh DataHandler。
英文文档:
setCommandContext
void setCommandContext(String verb,
DataHandler dh)
throws IOExceptionInitialize the Command with the verb it is requested to handle and the DataHandler that describes the data it will operate on. NOTE: it is acceptable for the caller to pass null as the value for DataHandler.
Parameters:
verb - The Command Verb this object refers to.
dh - The DataHandler.
Throws:
IOException