/* $Id$ */ package org.noreply.fancydress.type3.routing; /** * Base class for all Routings that appear within a chain. * * Routings of this type mean that the packet is forwarded * (possible after a SWAP operation) to a next node. */ public abstract class RoutingForward extends Routing { /** * Keyid of the next hop's Identity Key */ protected byte[] keyid; /** * Default constructor. * * @param type The routing type as integer. */ protected RoutingForward(int type, byte[] keyid) { super (type); this.keyid = keyid; } /** * Get the same routing information as a SWAP type. * * @return A routing class with the same information, but with a SWAP routing type. */ public abstract RoutingForward asSwap(); /** * Return the Identity Key of the next node * * @returns next node's identity key. */ public byte[] getKeyID() { return keyid; } }