|
Oracle Application Server Wireless J2ME SDK API Reference B14045-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.wireless.me.core.ServiceManager
ServiceManager provides the Offline Management capability for Call invocation. When wireless networking connection is temporarily broken, application developers can use the ServiceManger to queue the call. ServiceManager will automatically resend it later after the wireless networking connection is restored.
ServiceManager also provides methods and internal functionality needed for caching of responses in the device's persistent storage.
MIDlet's should always call the ServiceManager's close() method when they exit (just before calling notifyDestroyed()) in order to close the RMS RecordStore used for queueing and caching.
Application developers should only queue a Call when the failure of the service invocation is due to the temporary failure of the wireless network connection. Queuing a successfully invoked Call means that it will be invoked again by ServiceManager.
Method Summary | |
int |
callKey(Call call) Returns the cache key for the given call. |
void |
cancelAllQueue() Removes all queued Calls from the queue. |
boolean |
cancelQueue(Call call) Removes a queued Call from the queue. |
void |
clearCache() Clears the cache of all cached responses. |
void |
clearExpiredCache() Delete expired responses from cache. |
void |
close() This closes the RMS record store used for caching and queueing; this method should always be called when a MIDlet exits. |
int |
deleteResponse(int key) Deletes a response from the cache. |
static ServiceManager |
getInstance() The singleton thread-safe getter |
Call |
getQueuedCall(int recId) Get a queued Call by RMS record id. |
int[] |
getQueuedCalls(boolean hasBeenInvoked) Get an array of record ids of queued calls, based on the status of the invocation in the Call Queue managed by ServiceManager |
int |
queueCall(Call call) Put a Call into the call queue. |
void |
run() |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ServiceManager getInstance() throws ServiceException
ServiceException
public int[] getQueuedCalls(boolean hasBeenInvoked) throws ServiceException
hasBeenInvoked
- boolean, true for invoked QueuedCalls, false for the QueuedCalls which have not been invoked by ServiceManagerServiceException
public Call getQueuedCall(int recId) throws ServiceException
ServiceException
public int queueCall(Call call) throws ServiceException
ServiceException
public int callKey(Call call) throws ServiceException
ServiceException
public boolean cancelQueue(Call call) throws ServiceException
call
- Call to remove from queue.ServiceException
public void cancelAllQueue() throws ServiceException
ServiceException
public void clearCache() throws ServiceException
ServiceException
public int deleteResponse(int key)
public void close() throws ServiceException
ServiceException
public void clearExpiredCache() throws ServiceException
ServiceException
public void run()
run
in interface java.lang.Runnable
|
Oracle Application Server Wireless J2ME SDK API Reference B14045-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |