WorkListener (Java EE 5)

Java EE API


javax.resource.spi.work Interface WorkListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
WorkAdapter

public interface WorkListener
extends EventListener

Implements: java.util.EventListener
Implemented by: WorkAdapter

此类模拟 WorkListener 实例,当发生各种 Work 处理事件(接受工作、拒绝工作、工作开始、工作完成)时 WorkManager 将通知该实例。 WorkListener 实例不得进行任何线程假设,并且必须是线程安全的,即可能从任意线程发生通知。此外,该实例不得假设任何通知顺序。
英文文档:

This models a WorkListener instance which would be notified by the WorkManager when the various Work processing events (work accepted, work rejected, work started, work completed) occur. The WorkListener instance must not make any thread assumptions and must be thread-safe ie., a notification could occur from any arbitrary thread. Further, it must not make any assumptions on the ordering of notifications.

Version:
1.0
Author:
Ram Jeyaraman

Method Summary
 void
 void
 void
 void
 

Method Detail

public void workAccepted(WorkEvent e)
接受 Work 实例时调用。
英文文档:

workAccepted

void workAccepted(WorkEvent e)
Invoked when a Work instance has been accepted.


public void workRejected(WorkEvent e)
拒绝 Work 实例时调用。
英文文档:

workRejected

void workRejected(WorkEvent e)
Invoked when a Work instance has been rejected.


public void workStarted(WorkEvent e)
Work 实例开始执行时调用。这仅仅意味着分配了一个线程。
英文文档:

workStarted

void workStarted(WorkEvent e)
Invoked when a Work instance has started execution. This only means that a thread has been allocated.


public void workCompleted(WorkEvent e)
Work 实例完成执行时调用。
英文文档:

workCompleted

void workCompleted(WorkEvent e)
Invoked when a Work instance has completed execution.



Submit a bug or feature

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

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

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