From 566d17f731637df6828bdf32502a0fb123882dbe Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 9 Oct 2003 11:41:45 +0000 Subject: Initial import --- .../noreply/fancydress/type3/routing/Routing.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/org/noreply/fancydress/type3/routing/Routing.java (limited to 'src/org/noreply/fancydress/type3/routing/Routing.java') 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(); + } +} -- cgit v1.2.3