org.eclipse.emf.mwe.internal.core.debug.communication.packages
Class AbstractPackage
java.lang.Object
org.eclipse.emf.mwe.internal.core.debug.communication.packages.AbstractPackage
- Direct Known Subclasses:
- BreakpointPackage, CommandPackage, ConfirmationPackage, EventPackage, HandshakePackage, RegisterPackage, RequireVarPackage, VarDataPackage
public abstract class AbstractPackage
- extends java.lang.Object
The base class for all types of packages. It has the id and refId. Inheriting classes must call setNextId to get
a valid id.
Field Summary |
protected int |
id
|
int |
refId
|
Method Summary |
int |
getId()
|
abstract void |
readContent(java.io.DataInputStream in)
fill the packet fields from the DataInputStream . |
protected void |
setNextId()
|
java.lang.String |
toString()
|
abstract void |
writeContent(java.io.DataOutputStream out)
write the packet fields content to the DataOutputStream . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
id
protected int id
refId
public int refId
AbstractPackage
public AbstractPackage()
getId
public int getId()
readContent
public abstract void readContent(java.io.DataInputStream in)
throws java.io.IOException
- fill the packet fields from the
DataInputStream
. Implementors have to make sure that the
data content matches with the writeContent(out) method!!
- Parameters:
in
- the DataInputStream
- Throws:
java.io.IOException
writeContent
public abstract void writeContent(java.io.DataOutputStream out)
throws java.io.IOException
- write the packet fields content to the
DataOutputStream
. Implementors have to make sure
that the data content matches with the readContent(out) method!!
- Parameters:
out
- the DataOutputStream
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
setNextId
protected void setNextId()