@OpenApiAll public abstract class ConcurrentTool extends Tool
Modifier and Type | Class and Description |
---|---|
static class |
ConcurrentTool.ConsumeObject
Inner class which acts as the reference for a file pending deletion.
|
ITool.HTMLString, ITool.RetainedString, ITool.Void
context, properties
Modifier | Constructor and Description |
---|---|
protected |
ConcurrentTool()
Create concurrent tool.
|
protected |
ConcurrentTool(java.lang.String name)
Create concurrent tool with name.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
consume(ConcurrentTool.ConsumeObject consumeObject)
Consume a object.
|
void |
destroy()
Called by the engine to inform this tool is no longer use and that it should destroy any resources that it
has allocated.
|
protected boolean |
isNoSpaceException(java.lang.Exception e) |
boolean |
isRunning()
Returns true if the internal thread is running.
|
boolean |
offer(ConcurrentTool.ConsumeObject consumeObject)
Inserts the specified element into this queue, if possible.
|
clone, getContext, getProperties, getProperty, getProperty, notifyObservers, setContext, setProperties
protected ConcurrentTool()
protected ConcurrentTool(java.lang.String name)
name
- name of consume thread.public void destroy()
public boolean isRunning() throws java.lang.Throwable
java.lang.Throwable
- when exception occurspublic boolean offer(ConcurrentTool.ConsumeObject consumeObject)
consumeObject
- the consume object to insert.public abstract void consume(ConcurrentTool.ConsumeObject consumeObject)
consumeObject
- consume objectprotected boolean isNoSpaceException(java.lang.Exception e)
Copyright © 2010 - No Magic Asia