CommandObject (Java EE 5)

Java EE API


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
 

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 IOException
Initialize 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


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!