diff options
Diffstat (limited to 'src/org/noreply/fancydress/type3/routing/Routing.java')
-rw-r--r-- | src/org/noreply/fancydress/type3/routing/Routing.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/org/noreply/fancydress/type3/routing/Routing.java b/src/org/noreply/fancydress/type3/routing/Routing.java new file mode 100644 index 0000000..c87bb53 --- /dev/null +++ b/src/org/noreply/fancydress/type3/routing/Routing.java @@ -0,0 +1,44 @@ +package org.noreply.fancydress.type3.routing; + +/** + * Base class for all Routing classes. + * + * Routing Type and Routing Information are pooled into this one entity. + * + * @see RoutingType + */ +public abstract class Routing { + protected RoutingType type; + + /** + * Default constructor. + * + * @param type The routing type as integer. + */ + protected Routing(int type) { + this.type = new RoutingType(type); + } + + /** + * Return the total length in octets of the routing information. + * + * @return total length in octets of the routing information + */ + public abstract int getRoutingInformationLength(); + + /** + * Return the routing information. + * + * @return routing information + */ + public abstract byte[] getRoutingInformation(); + + /** + * Get the routing type of this instance. + * + * @return routing type + */ + public int getRoutingType() { + return type.getType(); + } +} |