org.openmobileis.synchro.openmsp.protocol
Class AbstractCommand

java.lang.Object
  extended byorg.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

Field Summary
protected  int cmdId
           
protected  int commandType
           
 
Fields inherited from interface org.openmobileis.synchro.openmsp.protocol.Element
ADD, DELETE, FINAL, GET, HEADER, ITEM, MAP, MAP_ITEM, REPLACE, RESULT, SEQUENCE, STATUS, SYNC
 
Constructor Summary
AbstractCommand(int commandType)
           
 
Method Summary
 int getCmdId()
           
 int getElementType()
           
 boolean hasCommandId()
           
 boolean hasCommmandId()
           
 void setCmdId(int cmdId)
           
 void setCmdRef(int cmdRef)
           
 void setCredentialData(java.lang.String data)
           
 void setCredentialMeta(java.lang.String meta)
           
 void setData(java.lang.String data)
           
 void setElementType(int elementType)
           
 void setMetaInformation(java.lang.String meta)
           
 void setSource(java.lang.String source)
           
 void setSourceRef(java.lang.String source)
           
 void setSourceSessionID(long sessionID)
           
 void setTarget(java.lang.String target)
           
 void setTargetRef(java.lang.String target)
           
 java.lang.String toString()
           
 void writeBeginTag(java.lang.StringBuffer buffer)
           
 void writeContent(java.lang.StringBuffer buffer)
           
 void writeEndTag(java.lang.StringBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

commandType

protected int commandType

cmdId

protected int cmdId
Constructor Detail

AbstractCommand

public AbstractCommand(int commandType)
Method Detail

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.