com.sun.sgs.impl.service.session
Class ClientSessionHandler.SetupCompletionFuture

java.lang.Object
  extended by com.sun.sgs.impl.util.AbstractCompletionFuture<SessionProtocolHandler>
      extended by com.sun.sgs.impl.service.session.ClientSessionHandler.SetupCompletionFuture
All Implemented Interfaces:
Future<SessionProtocolHandler>
Enclosing class:
ClientSessionHandler

static class ClientSessionHandler.SetupCompletionFuture
extends AbstractCompletionFuture<SessionProtocolHandler>

This future is constructed with the RequestCompletionHandler passed to one of the ProtocolListener's methods: newLogin or relocatedSession.


Constructor Summary
ClientSessionHandler.SetupCompletionFuture(SessionProtocolHandler protocolHandler, RequestCompletionHandler<SessionProtocolHandler> completionHandler)
          Constructs an instance with the specified protocolHandler and completionHandler.
 
Method Summary
 void done()
          Indicates that the operation associated with this future is complete and notifies the associated completion handler.
protected  SessionProtocolHandler getValue()
          Returns the value associated with this future.
 void setException(Throwable throwable)
          Sets the exception cause for this future to the specified throwable.
 
Methods inherited from class com.sun.sgs.impl.util.AbstractCompletionFuture
cancel, get, get, isCancelled, isDone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientSessionHandler.SetupCompletionFuture

ClientSessionHandler.SetupCompletionFuture(SessionProtocolHandler protocolHandler,
                                           RequestCompletionHandler<SessionProtocolHandler> completionHandler)
Constructs an instance with the specified protocolHandler and completionHandler.

Parameters:
protocolHandler - a session protocol handler
completionHandler - a completionHandler
Method Detail

getValue

protected SessionProtocolHandler getValue()
Returns the value associated with this future.

Specified by:
getValue in class AbstractCompletionFuture<SessionProtocolHandler>
Returns:
the value for this future

setException

public void setException(Throwable throwable)
Sets the exception cause for this future to the specified throwable. The given exception will be used as the cause of the ExecutionException thrown by this future's get methods.

Overrides:
setException in class AbstractCompletionFuture<SessionProtocolHandler>
Parameters:
throwable - an exception cause

done

public void done()
Indicates that the operation associated with this future is complete and notifies the associated completion handler. Subsequent invocations to isDone will return true.

Overrides:
done in class AbstractCompletionFuture<SessionProtocolHandler>

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved