org.openspaces.core.executor.support
Class PrivilegedTask<T extends Serializable>
java.lang.Object
org.openspaces.core.executor.support.SimpleDelegatingTask<T>
org.openspaces.core.executor.support.PrivilegedTask<T>
- All Implemented Interfaces:
- Externalizable, Serializable, DelegatingTask<T>, Task<T>, TaskRoutingProvider
public class PrivilegedTask<T extends Serializable>
- extends SimpleDelegatingTask<T>
- implements Externalizable
A delegating task that runs under established access control settings.
- Author:
- kimchy
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrivilegedTask
public PrivilegedTask()
- Here for externalizable.
PrivilegedTask
public PrivilegedTask(Task<T> task)
- Constructs a new privileged task wrapping the actual task to execute.
execute
public T execute()
throws Exception
- Exeutes the provided task under access controls.
- Specified by:
execute
in interface Task<T extends Serializable>
- Overrides:
execute
in class SimpleDelegatingTask<T extends Serializable>
- Returns:
- computed result
- Throws:
Exception
- if unable to compute a result
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Throws:
IOException
ClassNotFoundException
Copyright © GigaSpaces.