GigaSpaces XAP 9.7.2 API

org.openspaces.core.executor.support
Class PrivilegedTask<T extends Serializable>

java.lang.Object
  extended by org.openspaces.core.executor.support.SimpleDelegatingTask<T>
      extended by 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

Constructor Summary
PrivilegedTask()
          Here for Externalizable.
PrivilegedTask(Task<T> task)
          Constructs a new privileged task wrapping the actual task to execute.
 
Method Summary
 T execute()
          Executes the provided task under access controls.
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.openspaces.core.executor.support.SimpleDelegatingTask
_readExternal, _writeExternal, getDelegatedTask, getRouting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivilegedTask

public PrivilegedTask()
Here for Externalizable.


PrivilegedTask

public PrivilegedTask(Task<T> task)
Constructs a new privileged task wrapping the actual task to execute.

Method Detail

execute

public T execute()
                               throws Exception
Executes 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

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.