threads
Class InboxThread

java.lang.Object
  extended by java.lang.Thread
      extended by threads.InboxThread
All Implemented Interfaces:
java.lang.Runnable

public class InboxThread
extends java.lang.Thread

Thread for the inbox connections

Author:
Gabriele Bianchi

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 InboxClient inboxClient
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
InboxThread(boolean pop, StartMidlet mid)
           
 
Method Summary
 void close()
           
 Message getMessage(int index)
          Get a message
 java.util.Vector getMessageList()
          Get the list of mails
 void removeMessage(int index)
          Remove a message
 void run()
          run thread
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inboxClient

public InboxClient inboxClient
Constructor Detail

InboxThread

public InboxThread(boolean pop,
                   StartMidlet mid)
Method Detail

close

public void close()

getMessage

public Message getMessage(int index)
                   throws MailException,
                          java.io.IOException
Get a message

Parameters:
index -
Returns:
Message
Throws:
MailException
java.io.IOException

getMessageList

public java.util.Vector getMessageList()
                                throws MailException,
                                       java.io.IOException
Get the list of mails

Returns:
vector of messages
Throws:
MailException
java.io.IOException

removeMessage

public void removeMessage(int index)
                   throws MailException,
                          java.io.IOException
Remove a message

Parameters:
index -
Throws:
MailException
java.io.IOException

run

public void run()
run thread

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