org.simtk.pdb
Class LoadPdbUrlProcess

java.lang.Object
  extended by java.lang.Thread
      extended by org.simtk.pdb.LoadPdbUrlProcess
All Implemented Interfaces:
java.lang.Runnable, MonitoredProcess

public class LoadPdbUrlProcess
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  MoleculeCollection molecules
           
protected  java.net.URL url
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected LoadPdbUrlProcess(java.net.URL url, SimpleObservable loadMoleculeObservable)
           
 
Method Summary
 void abort()
           
 void cancelLoad()
           
protected  java.io.InputStream getInputStream()
           
 int getMaximum()
           
 int getMinimum()
           
 MoleculeCollection getMolecules()
           
 int getProgress()
           
 boolean isFailed()
           
 boolean isSuccessful()
           
protected  void loadMolecules()
           
 void run()
           
 void setPdbId(java.lang.String pdbId)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.simtk.gui.MonitoredProcess
isAlive
 

Field Detail

url

protected java.net.URL url

molecules

protected volatile MoleculeCollection molecules
Constructor Detail

LoadPdbUrlProcess

protected LoadPdbUrlProcess(java.net.URL url,
                            SimpleObservable loadMoleculeObservable)
Method Detail

getInputStream

protected java.io.InputStream getInputStream()
                                      throws java.io.IOException
Throws:
java.io.IOException

setPdbId

public void setPdbId(java.lang.String pdbId)

loadMolecules

protected void loadMolecules()
                      throws java.io.IOException,
                             java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

cancelLoad

public void cancelLoad()

getMolecules

public MoleculeCollection getMolecules()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

abort

public void abort()
Specified by:
abort in interface MonitoredProcess

getProgress

public int getProgress()
Specified by:
getProgress in interface MonitoredProcess

getMinimum

public int getMinimum()
Specified by:
getMinimum in interface MonitoredProcess

getMaximum

public int getMaximum()
Specified by:
getMaximum in interface MonitoredProcess

isFailed

public boolean isFailed()
Specified by:
isFailed in interface MonitoredProcess

isSuccessful

public boolean isSuccessful()
Specified by:
isSuccessful in interface MonitoredProcess