public final class Nice extends Object implements Invoke
| Modifier and Type | Field and Description |
|---|---|
boolean |
fast
A flag to indicate if this wrapper is maximising or minimising the
priority of the invocation thread.
|
Object |
item
The presumably local object reference, for which invocation thread
priority will be managed.
|
| Constructor and Description |
|---|
Nice(Object item,
boolean fast)
The constuctor wraps an object reference, and allows invocations to
execute at either minumum or maximum priority.
|
public final Object item
public final boolean fast
public Nice(Object item, boolean fast)
item - The object reference to be invokedfast - True to execute invocations at maximum priority, false to
invoke at minimum priorty.public Object invoke(String method, Object args) throws Exception
invoke in interface Invokemethod - The name of the method to invoke on the wrapped objectargs - The data relevant to the invocation. It can be a single
object, an array, or nullException - As needed by the object, also, a
java.rmi.RemoteException can be thrown for network related reasons,
also a SecurityException can be thrown, if the codebase does not have
permission from the SecurityManager to alter thread priority.Copyright © 2016. All Rights Reserved.