ch.aplu.gidlet
Class Gidlet.HttpGetter

java.lang.Object
  extended by java.lang.Thread
      extended by ch.aplu.gidlet.Gidlet.HttpGetter
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Gidlet

public class Gidlet.HttpGetter
extends java.lang.Thread

Class that creates a thread to transfer data using the HTTP GET command.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
  Gidlet.HttpGetter(java.lang.String uri)
          Creates a thread that transfers data from the given uri using the HTTP GET command.
protected Gidlet.HttpGetter(java.lang.String uri, boolean internalNotify)
           
 
Method Summary
 void run()
          For internal use only.
 void stop()
          Stops the HttpGetter thread while transfering data.
 
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, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Gidlet.HttpGetter

public Gidlet.HttpGetter(java.lang.String uri)
Creates a thread that transfers data from the given uri using the HTTP GET command. The callback method notifyHttpResponse() is triggered when the transfer is completed. The thread is then terminated and cannot be used any more.

See Also:
Gidlet.notifyHttpResponse(byte[], int)

Gidlet.HttpGetter

protected Gidlet.HttpGetter(java.lang.String uri,
                            boolean internalNotify)
Method Detail

stop

public void stop()
Stops the HttpGetter thread while transfering data.

Overrides:
stop in class java.lang.Thread

run

public void run()
For internal use only.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread