Remote System Explorer DataStore
Release 3.4

org.eclipse.dstore.core.java
Class ClassRequest

java.lang.Object
  extended by org.eclipse.dstore.core.java.ClassRequest

public class ClassRequest
extends Object

Represents a remote class request in the RemoteClassLoader. Contains methods for getting the status of the request, as well as getting the actual class after it has been loaded.


Constructor Summary
ClassRequest(String className, boolean synchronous)
          Constructs a new ClassRequest
 
Method Summary
 String getClassName()
          Returns the name of the class requested/loaded.
 Class getLoadedClass()
          Returns the class loaded, or null if it has not been loaded yet.
 boolean isLoaded()
          Returns whether or not the class has been loaded yet.
 boolean isRequested()
          Returns whether or not the class has been requested yet.
 boolean isSynchronous()
          Returns whether or not the class request is synchronous.
 void notifyResponse()
          Causes all threads waiting for this class request to be filled to wake up.
 void setLoaded(boolean loaded)
          Call this method when the class has been received and loaded.
 void setLoadedClass(Class loadedClass)
          Sets the class represented by this object after it has been loaded.
 void setRequested(boolean requested)
          Call this method when the request for the class has been sent.
 void waitForResponse()
          Causes the current thread to wait until this class request has been fulfilled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassRequest

public ClassRequest(String className,
                    boolean synchronous)
Constructs a new ClassRequest

Parameters:
className - The name of the class requested
synchronous - whether or not the request is synchronous
Method Detail

waitForResponse

public void waitForResponse()
Causes the current thread to wait until this class request has been fulfilled.


notifyResponse

public void notifyResponse()
Causes all threads waiting for this class request to be filled to wake up.


getLoadedClass

public Class getLoadedClass()
Returns the class loaded, or null if it has not been loaded yet.


isLoaded

public boolean isLoaded()
Returns whether or not the class has been loaded yet.


getClassName

public String getClassName()
Returns the name of the class requested/loaded.


isRequested

public boolean isRequested()
Returns whether or not the class has been requested yet.


isSynchronous

public boolean isSynchronous()
Returns whether or not the class request is synchronous.


setRequested

public void setRequested(boolean requested)
Call this method when the request for the class has been sent.


setLoaded

public void setLoaded(boolean loaded)
Call this method when the class has been received and loaded.


setLoadedClass

public void setLoadedClass(Class loadedClass)
Sets the class represented by this object after it has been loaded. (Sets loaded to be true and requested to be false). Notifies all threads waiting on this class request that the class has been loaded.


Remote System Explorer DataStore
Release 3.4

Copyright (c) IBM Corporation and others 2000, 2012. All Rights Reserved.