Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.mp
Class PositionResult

java.lang.Object
  extended byoracle.panama.mp.PositionResult


public class PositionResult
extends java.lang.Object

PositionResult class. A PositionResult object represents the result returned by mobile positioner. A PositionResult object mainly contains one or more PositionArea objects, each of which represents an area that the mobile device is located. Certain positioning providers locate a mobile device in only one area or at one point.

A PositionResult contains either an error (including an ID and a message) or a successful result value (including position areas, the mobile station's id, a time stamp and the provider info). After retrieving a PositionResult from a positioning server, you should first check if the result is an error.


Field Summary
static int UNKNOWNSUBSCRIBER
An int representation of an unknown subscriber ID
static java.lang.String UNKNOWNSUBSCRIBER_STR
A String representation of an unknown subscriber ID

Constructor Summary
PositionResult(int errorID, java.lang.String errorMsg, PositionArea[] areas, MPProvider provider, java.lang.String mobileID, java.util.Date timeStamp)
Constructor.

Method Summary
int getErrorID()
Returns the error ID.
java.lang.String getErrorMessage()
Returns the error message.
java.lang.String getMobileID()
Returns the MobileID of the result.
PositionArea[] getPositionAreas()
Get PositionAreas in a positioning result.
MPProvider getProvider()
Returns the MP Provider that returns the result.
java.util.Date getTimeStamp()
Get the time stamp of the PositionResult.
void setTimeStamp(java.util.Date ts)
Set the time stamp of the PositionResult.
java.lang.String toString()
Represent a PositionResult as a string.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

UNKNOWNSUBSCRIBER

public static final int UNKNOWNSUBSCRIBER
An int representation of an unknown subscriber ID
See Also:
Constant Field Values

UNKNOWNSUBSCRIBER_STR

public static final java.lang.String UNKNOWNSUBSCRIBER_STR
A String representation of an unknown subscriber ID
See Also:
Constant Field Values

Constructor Detail

PositionResult

public PositionResult(int errorID,
                      java.lang.String errorMsg,
                      PositionArea[] areas,
                      MPProvider provider,
                      java.lang.String mobileID,
                      java.util.Date timeStamp)
Constructor.
Parameters:
errorID - An integer representing the error ID. 0 means no error.
errorMsg - A String representing the error message. If there is no error, then errorMsg is either null or empty string.
areas - An array of PositionArea objects.
provider - An MPProvider object that provides this result.
mobileID - The ID of the located mobile target.
timeStamp - A Dateobject representing the time when the positioning result is generated. Please note this time can be either the exact time that the position result is generated by the positioning server or the time that the position result reaches the server. However in most cases the difference between these two is short.

Method Detail

getErrorID

public int getErrorID()
Returns the error ID. If the error ID is 0, then there is no error.
Returns:
Error ID.

getErrorMessage

public java.lang.String getErrorMessage()
Returns the error message.
Returns:
String Error message.

getMobileID

public java.lang.String getMobileID()
Returns the MobileID of the result.
Returns:
MobileID.

getPositionAreas

public PositionArea[] getPositionAreas()
Get PositionAreas in a positioning result.
Returns:
An array of PositionArea objects.

getProvider

public MPProvider getProvider()
Returns the MP Provider that returns the result.
Returns:
MPProvider The provider that generates the mobile target location.

getTimeStamp

public java.util.Date getTimeStamp()
Get the time stamp of the PositionResult. It is the time of the acquisition of this positioning result.
Returns:
Date A Date object representing the time stamp.

setTimeStamp

public void setTimeStamp(java.util.Date ts)
Set the time stamp of the PositionResult.
Parameters:
ts - A Date object representing the time stamp.

toString

public java.lang.String toString()
Represent a PositionResult as a string.

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.