/* $Id$ */ package org.noreply.fancydress.type3.routing; /** * Base class for all Routings that are final destinations. * * Routings of this type usually mean that the message leaves the Type III * network at the server processing them (for instance to be delivered via * SMTP). In case of a DROP type it means that the packet is dropped at this * node. */ public abstract class RoutingDestination extends Routing { /** * The size of decoding handles for payloads */ public static final int DECODINGHANDLE_LEN = 20; /** * A decoding handle as is used in SURBS or forward encrypted messages. */ protected byte[] decodingHandle; /** * Default constructor. * * @param type The routing type as integer. */ protected RoutingDestination(int type) { super (type); decodingHandle = null; } /** * Set a decoding handle as is used in SURBS or forward encrypted messages. * * @param decodingHandle decoding handle */ public void setDecodingHandle(byte[] decodingHandle) { if (decodingHandle.length != DECODINGHANDLE_LEN) throw new Error("Decoding handle is not DECODINGHANDLE_LEN bytes long."); this.decodingHandle = decodingHandle; } }