com.jrockit.memleak.mlp
Class AbstractMemLeak.DelayedResult<V>

java.lang.Object
  extended by com.jrockit.memleak.mlp.AbstractMemLeak.DelayedResult<V>
Type Parameters:
V -
All Implemented Interfaces:
IResult<V>
Enclosing class:
AbstractMemLeak

protected abstract class AbstractMemLeak.DelayedResult<V>
extends java.lang.Object
implements IResult<V>

Author:
mpersson

Constructor Summary
AbstractMemLeak.DelayedResult()
           
 
Method Summary
 V get()
          The actual result.
 long getChangeTime()
          Get the time stamp of when this result last changed state.
 boolean isDone()
          Returns true if this task completed.
 boolean isDone(java.lang.Object notificationToken)
          Checks if the result is available.
protected abstract  V parseResponse(java.io.DataInputStream dis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMemLeak.DelayedResult

public AbstractMemLeak.DelayedResult()
Method Detail

getChangeTime

public long getChangeTime()
Description copied from interface: IResult
Get the time stamp of when this result last changed state. In other words: If IResult.isDone() is false, returns the time when the request was sent. If IResult.isDone() is true, returns the time when the response was received.

Specified by:
getChangeTime in interface IResult<V>
Returns:
a time stamp (in milliseconds since 1970-01-01)

isDone

public boolean isDone()
Description copied from interface: IResult
Returns true if this task completed. Completion may be due to normal termination, an exception, or cancellation -- in all of these cases, this method will return true.

Specified by:
isDone in interface IResult<V>
Returns:
true if this task completed.

isDone

public boolean isDone(java.lang.Object notificationToken)
Description copied from interface: IResult
Checks if the result is available. If so, simply returns true. Otherwise, notificationToken is added to the token set that will be given to notification listeners once the result is available. And false is returned.

Specified by:
isDone in interface IResult<V>
Returns:
true if this task completed.

get

public V get()
      throws GarbageCollectedException,
             SpiException
Description copied from interface: IResult
The actual result.

Specified by:
get in interface IResult<V>
Returns:
V
Throws:
GarbageCollectedException
SpiException

parseResponse

protected abstract V parseResponse(java.io.DataInputStream dis)
                            throws java.io.IOException,
                                   GarbageCollectedException,
                                   SpiException
Parameters:
dis -
Returns:
V
Throws:
java.io.IOException
GarbageCollectedException
SpiException


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.