|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncml.protocol.SyncMLStatus
public class SyncMLStatus
This class is a container for SyncML status command.
It can be filled from an incominig SyncML fragment using the static
method parse
, or can be filled with all the info and then
used to format an outgoing Status command.
Field Summary | |
---|---|
static int |
ALREADY_EXISTS
|
static int |
AUTHENTICATION_ACCEPTED
|
static int |
BACKEND_AUTH_ERROR
|
static int |
CHUNKED_ITEM_ACCEPTED
|
static int |
DEVICE_FULL
|
static int |
FORBIDDEN
|
static int |
GENERIC_ERROR
|
static int |
INVALID_CREDENTIALS
|
static int |
NOT_FOUND
|
static int |
PROCESSING_ERROR
|
static int |
REFRESH_REQUIRED
|
static int |
SERVER_BUSY
|
static int |
SUCCESS
|
Constructor Summary | |
---|---|
SyncMLStatus()
|
|
SyncMLStatus(java.lang.String cmdId,
java.lang.String msgref,
java.lang.String cmdref,
java.lang.String cmd,
java.lang.String[] items,
int status)
|
|
SyncMLStatus(java.lang.String cmdId,
java.lang.String msgref,
java.lang.String cmdref,
java.lang.String cmd,
java.lang.String src,
java.lang.String tgt,
int status)
|
Method Summary | |
---|---|
java.lang.String |
getChalFormat()
|
java.lang.String |
getChalNextNonce()
|
java.lang.String |
getChalType()
|
java.lang.String |
getCmd()
Get the command name |
java.lang.String |
getCmdId()
Get the command id |
java.lang.String |
getCmdRef()
Get the command reference |
java.lang.String[] |
getItemKeys()
Get the keys of the items acknowledged by this status. |
java.lang.String |
getMsgRef()
Get the message reference |
java.lang.String |
getRef()
Get target reference if set, or source reference otherwise |
java.lang.String |
getSrcRef()
Get the source reference |
int |
getStatus()
Get the status code |
java.lang.String |
getStatusDataMessage()
|
java.lang.String |
getTgtRef()
Get the target reference |
boolean |
isSuccess()
Return true is the status code of this instance is the range 200-299. |
static boolean |
isSuccess(int status)
Return true is the given status code is in the range 200-299. |
static SyncMLStatus |
parse(ChunkedString xmlCommand)
Parse a SyncML fragment and return the first status command found, or null in case of error. |
void |
setCmd(java.lang.String cmd)
Set the command name |
void |
setCmdId(java.lang.String cmdId)
Set the command id |
void |
setCmdRef(java.lang.String cmdRef)
Set the command reference |
void |
setItemKeys(java.lang.String[] items)
Set the keys of the items acknowledged by this status. |
void |
setMsgRef(java.lang.String msgRef)
Set the message reference |
void |
setSrcRef(java.lang.String srcRef)
Set the source reference |
void |
setStatus(int status)
Set the status code |
void |
setStatusDataMessage(ChunkedString statusDataMessage)
|
void |
setTgtRef(java.lang.String tgtRef)
Set the target reference |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SUCCESS
public static final int AUTHENTICATION_ACCEPTED
public static final int CHUNKED_ITEM_ACCEPTED
public static final int INVALID_CREDENTIALS
public static final int FORBIDDEN
public static final int NOT_FOUND
public static final int ALREADY_EXISTS
public static final int DEVICE_FULL
public static final int GENERIC_ERROR
public static final int SERVER_BUSY
public static final int PROCESSING_ERROR
public static final int REFRESH_REQUIRED
public static final int BACKEND_AUTH_ERROR
Constructor Detail |
---|
public SyncMLStatus()
public SyncMLStatus(java.lang.String cmdId, java.lang.String msgref, java.lang.String cmdref, java.lang.String cmd, java.lang.String src, java.lang.String tgt, int status)
public SyncMLStatus(java.lang.String cmdId, java.lang.String msgref, java.lang.String cmdref, java.lang.String cmd, java.lang.String[] items, int status)
Method Detail |
---|
public java.lang.String getCmdId()
public void setCmdId(java.lang.String cmdId)
public java.lang.String getMsgRef()
public void setMsgRef(java.lang.String msgRef)
public java.lang.String getCmdRef()
public void setCmdRef(java.lang.String cmdRef)
public java.lang.String getCmd()
public void setCmd(java.lang.String cmd)
public java.lang.String getSrcRef()
public void setSrcRef(java.lang.String srcRef)
public java.lang.String getTgtRef()
public void setTgtRef(java.lang.String tgtRef)
public java.lang.String getRef()
public java.lang.String[] getItemKeys()
public void setItemKeys(java.lang.String[] items)
public int getStatus()
public void setStatus(int status)
public java.lang.String getChalType()
public java.lang.String getChalFormat()
public java.lang.String getChalNextNonce()
public static SyncMLStatus parse(ChunkedString xmlCommand)
public boolean isSuccess()
public static boolean isSuccess(int status)
public void setStatusDataMessage(ChunkedString statusDataMessage)
public java.lang.String getStatusDataMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |