Class RoutingCombo

java.lang.Object
net.messagevortex.asn1.AbstractBlock
net.messagevortex.asn1.RoutingCombo
All Implemented Interfaces:
Serializable, Block, Dumpable

public class RoutingCombo extends AbstractBlock implements Serializable
Created by martin.gwerder on 14.04.2016.
See Also:
  • Field Details

  • Constructor Details

    • RoutingCombo

      public RoutingCombo()

      Creates an empty router block.

    • RoutingCombo

      public RoutingCombo(byte[] b, boolean encrypted) throws IOException

      Creates a router block from a DER representation.

      if a router block is assumed encryptedand without decryption key) it stores the block as binary blob without handling its inner workings

      Parameters:
      b - the binary representation of the DER encoded and possibly encrypted block
      encrypted - flagging whether this block is expected to be unparseable due to its encryption
      Throws:
      IOException - if failing to parse the block
    • RoutingCombo

      public RoutingCombo(org.bouncycastle.asn1.ASN1Encodable to) throws IOException
      Throws:
      IOException
  • Method Details

    • parse

      protected final void parse(org.bouncycastle.asn1.ASN1Encodable to) throws IOException
      Specified by:
      parse in class AbstractBlock
      Throws:
      IOException
    • isEncrypted

      public boolean isEncrypted()
    • getFirstProcessTime

      public long getFirstProcessTime()
    • setFistProcessTime

      public long setFistProcessTime(long minProcessTime)

      Sets time when router block could be processed (earliest).

      Parameters:
      minProcessTime - the time to be set
      Returns:
      the previously set time
    • getLastProcessTime

      public long getLastProcessTime()
    • setLastProcessTime

      public long setLastProcessTime(long maxProcessTime)

      Sets time when router block could be processed (latest).

      Parameters:
      maxProcessTime - the time to be set
      Returns:
      the previously set time
    • toAsn1Object

      public org.bouncycastle.asn1.ASN1Object toAsn1Object(DumpType dumpType) throws IOException
      Description copied from interface: Dumpable

      Dumps an ASN.1 representation of the object.

      Specified by:
      toAsn1Object in interface Dumpable
      Parameters:
      dumpType - the dump type to be used
      Returns:
      the ASN.1 string representation of the object
      Throws:
      IOException - if dumping of the object fails due to an illegal internal state of the object
    • addOperation

      public boolean addOperation(Operation o)
    • toEncBytes

      public byte[] toEncBytes()
    • dumpValueNotation

      public String dumpValueNotation(String prefix, DumpType dumpType)
      Specified by:
      dumpValueNotation in interface Block
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object