summaryrefslogtreecommitdiff
path: root/src/org/noreply/fancydress/type3/routing/Routing.java
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-10-09 11:41:45 +0000
committerPeter Palfrader <peter@palfrader.org>2003-10-09 11:41:45 +0000
commit566d17f731637df6828bdf32502a0fb123882dbe (patch)
treefc09fdfb90953134fa1d25f73367307502348a22 /src/org/noreply/fancydress/type3/routing/Routing.java
parent018eea460ee32df1b70c40c2eca05f06c06daca5 (diff)
Initial import
Diffstat (limited to 'src/org/noreply/fancydress/type3/routing/Routing.java')
-rw-r--r--src/org/noreply/fancydress/type3/routing/Routing.java44
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();
+ }
+}