ProgressObject (Java EE 5)

Java EE API


javax.enterprise.deploy.spi.status Interface ProgressObject


public interface ProgressObject


ProgressObject 接口跟踪并报告部署活动、分发、启动、停止和取消部署的进度。

此类有一个可选的 cancel 方法。可以通过 isCancelSupported 方法测试是否支持 cancel 功能。

ProgressObject 结构允许用户选择轮询状态或者提供回调。

英文文档:

The ProgressObject interface tracks and reports the progress of the deployment activities, distribute, start, stop, undeploy.

This class has an optional cancel method. The support of the cancel function can be tested by the isCancelSupported method.

The ProgressObject structure allows the user the option of polling for status or to provide a callback.


Method Summary
 void
 void
 ClientConfiguration
 DeploymentStatus
 TargetModuleID[]
 boolean
 boolean
 void
 void
 

Method Detail

public DeploymentStatus getDeploymentStatus()
获取此活动的状态。
return 包含状态信息的对象。
英文文档:

getDeploymentStatus

DeploymentStatus getDeploymentStatus()
Retrieve the status of this activity.

Returns:
An object containing the status information.

public TargetModuleID[] getResultTargetModuleIDs()
获取成功处理或由关联 DeploymentManager 操作创建的 TargetModuleID 所组成的列表。
return TargetModuleID 列表。
英文文档:

getResultTargetModuleIDs

TargetModuleID[] getResultTargetModuleIDs()
Retrieve the list of TargetModuleIDs successfully processed or created by the associated DeploymentManager operation.

Returns:
a list of TargetModuleIDs.

public ClientConfiguration getClientConfiguration(TargetModuleID id)
返回与 TargetModuleID 关联的 ClientConfiguration 对象。
return 返回给定 TargetModuleID 的 ClientConfiguration;如果不存在,则返回 null。
英文文档:

getClientConfiguration

ClientConfiguration getClientConfiguration(TargetModuleID id)
Return the ClientConfiguration object associated with the TargetModuleID.

Returns:
ClientConfiguration for a given TargetModuleID or null if none exists.

public boolean isCancelSupported()
测试供应商是否支持部署活动的取消操作。
return 如果此平台支持取消活动,则返回 true
英文文档:

isCancelSupported

boolean isCancelSupported()
Tests whether the vendor supports a cancel opertation for deployment activities.

Returns:
true if canceling an activity is supported by this platform.

public void cancel() throws OperationUnsupportedException
(可选)对处理中的操作的取消请求,请求停止所有正在处理的操作,并将环境返回到操作执行前的原始状态。已经运行完成的操作无法取消。
ThrowsOperationUnsupportedException: 此实现不支持此可选命令。
英文文档:

cancel

void cancel()
            throws OperationUnsupportedException
(optional) A cancel request on an in-process operation stops all further processing of the operation and returns the environment to it original state before the operation was executed. An operation that has run to completion cannot be cancelled.

Throws:
OperationUnsupportedException - this optional command is not supported by this implementation.

public boolean isStopSupported()
测试供应商是否支持部署活动的停止操作。
return 如果此平台支持取消活动,则返回 true
英文文档:

isStopSupported

boolean isStopSupported()
Tests whether the vendor supports a stop opertation for deployment activities.

Returns:
true if canceling an activity is supported by this platform.

public void stop() throws OperationUnsupportedException
(可选)对处理中的操作的停止请求,允许对当前 TargetModuleID 的操作运行完成,但停止处理尚未处理的 TargetModuleID 对象。getResultTargetModuleIDs 方法必须返回经过处理的 TargetModuleID。
ThrowsOperationUnsupportedException: 此实现不支持此可选命令。
英文文档:

stop

void stop()
          throws OperationUnsupportedException
(optional) A stop request on an in-process operation allows the operation on the current TargetModuleID to run to completion but does not process any of the remaining unprocessed TargetModuleID objects. The processed TargetModuleIDs must be returned by the method getResultTargetModuleIDs.

Throws:
OperationUnsupportedException - this optional command is not supported by this implementation.

public void addProgressListener(ProgressListener pol)
添加一个侦听器,以接收部署操作的 Progress 事件。
pol 接受事件的侦听器
See also javax.enterprise.deploy.spi.status.ProgressEvent
英文文档:

addProgressListener

void addProgressListener(ProgressListener pol)
Add a listener to receive Progress events on deployment actions.

Parameters:
pol - the listener to receive events
See Also:
ProgressEvent

public void removeProgressListener(ProgressListener pol)
移除 ProgressObject 侦听器。
pol 正移除的侦听器
See also javax.enterprise.deploy.spi.status.ProgressEvent
英文文档:

removeProgressListener

void removeProgressListener(ProgressListener pol)
Remove a ProgressObject listener.

Parameters:
pol - the listener being removed
See Also:
ProgressEvent


Submit a bug or feature

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

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

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