FileDocCategorySizeDatePackage
DelegatedTask.javaAPI DocAndroid 1.5 API2299Wed May 06 22:41:06 BST 2009org.apache.harmony.xnet.provider.jsse

DelegatedTask

public class DelegatedTask extends Object implements Runnable
Delegated Runnable task for SSLEngine

Fields Summary
private final org.apache.harmony.xnet.provider.jsse.HandshakeProtocol
handshaker
private final PrivilegedExceptionAction
action
private final AccessControlContext
context
Constructors Summary
public DelegatedTask(PrivilegedExceptionAction action, org.apache.harmony.xnet.provider.jsse.HandshakeProtocol handshaker, AccessControlContext context)
Creates DelegatedTask

param
action
param
handshaker
param
context

        this.action = action;
        this.handshaker = handshaker;
        this.context = context;
    
Methods Summary
public voidrun()
Executes DelegatedTask

        synchronized (handshaker) {
            try {
                AccessController.doPrivileged(action, context);
            } catch (PrivilegedActionException e) {
                // pass exception to HandshakeProtocol
                handshaker.delegatedTaskErr = e.getException();
            } catch (RuntimeException e) {
                // pass exception to HandshakeProtocol
                handshaker.delegatedTaskErr = e;
            }
        }