siuying.gm.app.gmailer4j
Interface GMStorage

All Known Implementing Classes:
XMLStorage

public interface GMStorage

GMStorage Interface that defines method to store data object different method of storage can be implemented


Method Summary
 void close()
          close a storage
 boolean containsId(java.lang.String id)
          if an item is in storage
 void flush()
          flush the storage, force save the change permanently
 java.lang.Object get(java.lang.String id)
          get an Object from storage
 java.util.Iterator iterator()
          iterate through the threads in storage
 void open()
          open a storage
 void put(java.lang.String id, java.lang.Object item)
          store an Object to storage
 void remove(java.lang.String id)
          remove a thread from storage
 void setUrl(java.lang.String url)
          set the url/identifer of the storage depends on implementation
 

Method Detail

setUrl

void setUrl(java.lang.String url)
            throws java.lang.NullPointerException
set the url/identifer of the storage depends on implementation

Throws:
java.lang.NullPointerException

open

void open()
          throws java.io.IOException
open a storage

Throws:
java.io.IOException

close

void close()
close a storage


containsId

boolean containsId(java.lang.String id)
                   throws java.lang.NullPointerException
if an item is in storage

Throws:
java.lang.NullPointerException

get

java.lang.Object get(java.lang.String id)
                     throws java.io.IOException,
                            java.lang.NullPointerException
get an Object from storage

Throws:
java.io.IOException
java.lang.NullPointerException

put

void put(java.lang.String id,
         java.lang.Object item)
         throws java.io.IOException,
                java.lang.NullPointerException
store an Object to storage

Throws:
java.io.IOException
java.lang.NullPointerException

remove

void remove(java.lang.String id)
            throws java.io.IOException,
                   java.lang.NullPointerException
remove a thread from storage

Throws:
java.io.IOException
java.lang.NullPointerException

flush

void flush()
           throws java.io.IOException
flush the storage, force save the change permanently

Throws:
java.io.IOException

iterator

java.util.Iterator iterator()
iterate through the threads in storage