/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/message/Descriptor.java

http://mobicents.googlecode.com/ · Java · 39 lines · 12 code · 8 blank · 19 comment · 0 complexity · cec45581c88e5d4bca9ab88393a2b81e MD5 · raw file

  1. package javax.megaco.message;
  2. import java.io.Serializable;
  3. /**
  4. * The Jain MEGACO descriptor class is an abstract class. This is to be derived
  5. * by the individual descriptor classes.
  6. *
  7. * @author amit bhayani
  8. *
  9. */
  10. public abstract class Descriptor implements Serializable {
  11. protected int descriptorId = -1;
  12. /**
  13. * Constructs a Jain Megaco abstract class.
  14. */
  15. public Descriptor() {
  16. }
  17. /**
  18. * The method is an abstract method and can be used to get the descriptor
  19. * identifier. By overriding this method the derived class would return a
  20. * hardcoded value that would correspond to its descriptor identity.
  21. *
  22. * @return descriptorId - The integer corresponding to the descriptor id.
  23. * The values shall be defined in DescriptorType
  24. */
  25. public abstract int getDescriptorId();
  26. @Override
  27. public String toString() {
  28. //return getClass().getSimpleName();
  29. return super.toString();
  30. }
  31. }