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 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 Details

    • id

      protected int id
    • refId

      public int refId
  • Constructor Details

    • AbstractPackage

      public AbstractPackage()
  • Method Details

    • getId

      public int getId()
    • readContent

      public abstract void readContent(DataInputStream in) throws 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:
      IOException
    • writeContent

      public abstract void writeContent(DataOutputStream out) throws 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:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setNextId

      protected void setNextId()