javax.activation
类 CommandInfo

java.lang.Object
  继承者 javax.activation.CommandInfo

public class CommandInfo
extends Object

版本:
$Rev: 467742 $ $Date: 2011/05/07 04:32:39 $

构造方法摘要
CommandInfo(String commandName, String commandClass)
          Constructor for a CommandInfo
 
方法摘要
 String getCommandClass()
          Return the implementation class name.
 String getCommandName()
          Return the command name.
 Object getCommandObject(DataHandler dh, ClassLoader loader)
          Instantiate and return a command JavaBean.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

CommandInfo

public CommandInfo(String commandName,
                   String commandClass)
Constructor for a CommandInfo

参数:
commandName - the command name
commandClass - the name of the command's implementation class
方法详细信息

getCommandName

public String getCommandName()
Return the command name.

返回:
the command name

getCommandClass

public String getCommandClass()
Return the implementation class name.

返回:
the name of the command's implementation class; may be null

getCommandObject

public Object getCommandObject(DataHandler dh,
                               ClassLoader loader)
                        throws IOException,
                               ClassNotFoundException
Instantiate and return a command JavaBean. The bean is created using Beans.instantiate(loader, commandClass). If the new bean implements CommandObject then its setCommandContext(String, DataHandler) method is called. Otherwise if it implements Externalizable and the supplied DataHandler is not null then its readExternal(ObjectInputStream) method is called with a stream obtained from DataHandler.getInputStream().

参数:
dh - a DataHandler that provides the data to be passed to the command
loader - the ClassLoader to be used to instantiate the command
返回:
a new command instance
抛出:
IOException - if there was a problem initializing the command
ClassNotFoundException - if the command class could not be found


Copyright © 2013. All Rights Reserved.