com.micello.mapapi
Class ErrorMonitor

java.lang.Object
  extended by com.micello.mapapi.ErrorMonitor
All Implemented Interfaces:
CommunityChangedListener, MapThemeListener, ThemeDataListener

public class ErrorMonitor
extends java.lang.Object
implements CommunityChangedListener, MapThemeListener

This class is used to display messages. The application must set the ActivityContext to enable printing the error message. Error messages are printed if an ActivityContext is set and if not they are queued for later display. The SDK code posts errors to this object for display.


Field Summary
 
Fields inherited from interface com.micello.mapapi.data.CommunityChangedListener
COMMUNITY_CHANGED, DRAWING_CHANGED, ENTITIES_LOADED, GEOMETRY_LOADED, LEVEL_CHANGED, LEVEL_READY, META_DATA_LOADED
 
Constructor Summary
ErrorMonitor()
           
 
Method Summary
 void addMessageToQueue(java.lang.Integer errorCode)
          This method adds an error code to the message queue.
 void onCommunityChanged(Community community, Drawing drawing, DrawingLevel level, int flags)
          This is part of a listener method to monitor for errors.
 void onCommunityError(int cid, int did, int lid, int error, int flags)
          This is part of a listener method to monitor for errors.
 void onMapThemeLoaded(MapTheme mapTheme)
          This is part of a listener method to monitor for errors.
 void onThemeError(int error)
          This is part of a listener method to monitor for errors.
 void onThemeLoaded(Theme t)
          This is part of a listener method to monitor for errors.
 void setActivityContext(Activity activity)
          This method should be called when an activity is active.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorMonitor

public ErrorMonitor()
Method Detail

setActivityContext

public void setActivityContext(Activity activity)
This method should be called when an activity is active. When the activity is finished, this method should be called with null as a parameter. This allows error messages to be displayed.

Parameters:
activity - The activity

addMessageToQueue

public void addMessageToQueue(java.lang.Integer errorCode)
This method adds an error code to the message queue.


onCommunityChanged

public void onCommunityChanged(Community community,
                               Drawing drawing,
                               DrawingLevel level,
                               int flags)
This is part of a listener method to monitor for errors.

Specified by:
onCommunityChanged in interface CommunityChangedListener
Parameters:
community - The relevant community object. May be null.
drawing - The relevant drawing object. May be null.
level - The relevent level object. May be null.
flags - flags indicating the event

onCommunityError

public void onCommunityError(int cid,
                             int did,
                             int lid,
                             int error,
                             int flags)
This is part of a listener method to monitor for errors.

Specified by:
onCommunityError in interface CommunityChangedListener
Parameters:
cid - The relavant community id
did - The relevant drawing id
lid - The relevant level id
error - An error code
flags - flags indicating the event

onThemeLoaded

public void onThemeLoaded(Theme t)
This is part of a listener method to monitor for errors.

Specified by:
onThemeLoaded in interface ThemeDataListener

onThemeError

public void onThemeError(int error)
This is part of a listener method to monitor for errors.

Specified by:
onThemeError in interface ThemeDataListener

onMapThemeLoaded

public void onMapThemeLoaded(MapTheme mapTheme)
This is part of a listener method to monitor for errors.

Specified by:
onMapThemeLoaded in interface MapThemeListener