org.openmobileis.synchro.openmsp.protocol
Class AbstractCommand
java.lang.Object
org.openmobileis.synchro.openmsp.protocol.AbstractCommand
- All Implemented Interfaces:
- Element, OpenMISSerializable, java.io.Serializable
- Direct Known Subclasses:
- RequestCommand, ResponseCommand, Sequence
- public abstract class AbstractCommand
- extends java.lang.Object
- implements Element
Title: OpenMobileIS project source
Description: Superclass for OpenMSP commands :
Get, Sync, Add, Delete, Replace, Map, Sequence, Result, Status
An abstract command has a type (See Element for the command list) and a command id.
See Message and MessageFactory to have example for building commands
Direct subclass : RequestCommand, ResponseCommand, Sequence
- Since:
- JDK 1.1
- Version:
- 1.0.
- Author:
- Philippe Delrieu
- See Also:
- Serialized Form
Fields inherited from interface org.openmobileis.synchro.openmsp.protocol.Element |
ADD, DELETE, FINAL, GET, HEADER, ITEM, MAP, MAP_ITEM, REPLACE, RESULT, SEQUENCE, STATUS, SYNC |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
commandType
protected int commandType
cmdId
protected int cmdId
AbstractCommand
public AbstractCommand(int commandType)
getElementType
public int getElementType()
- Specified by:
getElementType
in interface Element
getCmdId
public int getCmdId()
- Specified by:
getCmdId
in interface Element
hasCommmandId
public boolean hasCommmandId()
- Specified by:
hasCommmandId
in interface Element
toString
public java.lang.String toString()
hasCommandId
public boolean hasCommandId()
setCmdId
public void setCmdId(int cmdId)
- Specified by:
setCmdId
in interface Element
setElementType
public void setElementType(int elementType)
- Specified by:
setElementType
in interface Element
setCredentialData
public void setCredentialData(java.lang.String data)
- Specified by:
setCredentialData
in interface Element
setCredentialMeta
public void setCredentialMeta(java.lang.String meta)
- Specified by:
setCredentialMeta
in interface Element
setSource
public void setSource(java.lang.String source)
- Specified by:
setSource
in interface Element
setSourceSessionID
public void setSourceSessionID(long sessionID)
- Specified by:
setSourceSessionID
in interface Element
setTarget
public void setTarget(java.lang.String target)
- Specified by:
setTarget
in interface Element
setMetaInformation
public void setMetaInformation(java.lang.String meta)
- Specified by:
setMetaInformation
in interface Element
setCmdRef
public void setCmdRef(int cmdRef)
- Specified by:
setCmdRef
in interface Element
setSourceRef
public void setSourceRef(java.lang.String source)
- Specified by:
setSourceRef
in interface Element
setTargetRef
public void setTargetRef(java.lang.String target)
- Specified by:
setTargetRef
in interface Element
setData
public void setData(java.lang.String data)
- Specified by:
setData
in interface Element
writeBeginTag
public void writeBeginTag(java.lang.StringBuffer buffer)
- Specified by:
writeBeginTag
in interface Element
writeContent
public void writeContent(java.lang.StringBuffer buffer)
- Specified by:
writeContent
in interface Element
writeEndTag
public void writeEndTag(java.lang.StringBuffer buffer)
- Specified by:
writeEndTag
in interface Element
Copyright 2006 OpenMobileIS. All Rights Reserved.