Class NetflowMessage

  • All Implemented Interfaces:
    Flow

    public class NetflowMessage
    extends java.lang.Object
    implements Flow
    • Constructor Detail

      • NetflowMessage

        public NetflowMessage​(FlowMessage flowMessageProto,
                              java.time.Instant receivedAt)
    • Method Detail

      • getReceivedAt

        public long getReceivedAt()
        Description copied from interface: Flow
        Time at which the flow was received by listener in milliseconds since epoch UTC.
        Specified by:
        getReceivedAt in interface Flow
      • getTimestamp

        public long getTimestamp()
        Description copied from interface: Flow
        Flow timestamp in milliseconds.
        Specified by:
        getTimestamp in interface Flow
      • getBytes

        public java.lang.Long getBytes()
        Description copied from interface: Flow
        Number of bytes transferred in the flow.
        Specified by:
        getBytes in interface Flow
      • getDirection

        public Flow.Direction getDirection()
        Description copied from interface: Flow
        Direction of the flow (egress vs ingress)
        Specified by:
        getDirection in interface Flow
      • getDstAddr

        public java.lang.String getDstAddr()
        Description copied from interface: Flow
        Destination address.
        Specified by:
        getDstAddr in interface Flow
      • getDstAddrHostname

        public java.util.Optional<java.lang.String> getDstAddrHostname()
        Description copied from interface: Flow
        Destination address hostname.
        Specified by:
        getDstAddrHostname in interface Flow
      • getDstAs

        public java.lang.Long getDstAs()
        Description copied from interface: Flow
        Destination autonomous system (AS).
        Specified by:
        getDstAs in interface Flow
      • getDstMaskLen

        public java.lang.Integer getDstMaskLen()
        Description copied from interface: Flow
        The number of contiguous bits in the source address subnet mask.
        Specified by:
        getDstMaskLen in interface Flow
      • getDstPort

        public java.lang.Integer getDstPort()
        Description copied from interface: Flow
        Destination port.
        Specified by:
        getDstPort in interface Flow
      • getEngineId

        public java.lang.Integer getEngineId()
        Description copied from interface: Flow
        Slot number of the flow-switching engine.
        Specified by:
        getEngineId in interface Flow
      • getEngineType

        public java.lang.Integer getEngineType()
        Description copied from interface: Flow
        Type of flow-switching engine.
        Specified by:
        getEngineType in interface Flow
      • getDeltaSwitched

        public java.lang.Long getDeltaSwitched()
        Description copied from interface: Flow
        Unix timestamp in ms at which the previous exported packet associated with this flow was switched.
        Specified by:
        getDeltaSwitched in interface Flow
      • getFirstSwitched

        public java.lang.Long getFirstSwitched()
        Description copied from interface: Flow
        Unix timestamp in ms at which the first packet associated with this flow was switched.
        Specified by:
        getFirstSwitched in interface Flow
      • getFlowRecords

        public int getFlowRecords()
        Description copied from interface: Flow
        Number of flow records in the associated packet.
        Specified by:
        getFlowRecords in interface Flow
      • getFlowSeqNum

        public long getFlowSeqNum()
        Description copied from interface: Flow
        Flow packet sequence number.
        Specified by:
        getFlowSeqNum in interface Flow
      • getInputSnmp

        public java.lang.Integer getInputSnmp()
        Description copied from interface: Flow
        SNMP ifIndex
        Specified by:
        getInputSnmp in interface Flow
      • getIpProtocolVersion

        public java.lang.Integer getIpProtocolVersion()
        Description copied from interface: Flow
        IPv4 vs IPv6
        Specified by:
        getIpProtocolVersion in interface Flow
      • getLastSwitched

        public java.lang.Long getLastSwitched()
        Description copied from interface: Flow
        Unix timestamp in ms at which the last packet associated with this flow was switched.
        Specified by:
        getLastSwitched in interface Flow
      • getNextHop

        public java.lang.String getNextHop()
        Description copied from interface: Flow
        Next hop
        Specified by:
        getNextHop in interface Flow
      • getNextHopHostname

        public java.util.Optional<java.lang.String> getNextHopHostname()
        Description copied from interface: Flow
        Next hop hostname
        Specified by:
        getNextHopHostname in interface Flow
      • getOutputSnmp

        public java.lang.Integer getOutputSnmp()
        Description copied from interface: Flow
        SNMP ifIndex
        Specified by:
        getOutputSnmp in interface Flow
      • getPackets

        public java.lang.Long getPackets()
        Description copied from interface: Flow
        Number of packets in the flow
        Specified by:
        getPackets in interface Flow
      • getProtocol

        public java.lang.Integer getProtocol()
        Description copied from interface: Flow
        IP protocol number i.e 6 for TCP, 17 for UDP
        Specified by:
        getProtocol in interface Flow
      • getSamplingInterval

        public java.lang.Double getSamplingInterval()
        Description copied from interface: Flow
        Sampling interval
        Specified by:
        getSamplingInterval in interface Flow
      • getSrcAddr

        public java.lang.String getSrcAddr()
        Description copied from interface: Flow
        Source address.
        Specified by:
        getSrcAddr in interface Flow
      • getSrcAddrHostname

        public java.util.Optional<java.lang.String> getSrcAddrHostname()
        Description copied from interface: Flow
        Source address hostname.
        Specified by:
        getSrcAddrHostname in interface Flow
      • getSrcAs

        public java.lang.Long getSrcAs()
        Description copied from interface: Flow
        Source autonomous system (AS).
        Specified by:
        getSrcAs in interface Flow
      • getSrcMaskLen

        public java.lang.Integer getSrcMaskLen()
        Description copied from interface: Flow
        The number of contiguous bits in the destination address subnet mask.
        Specified by:
        getSrcMaskLen in interface Flow
      • getSrcPort

        public java.lang.Integer getSrcPort()
        Description copied from interface: Flow
        Source port.
        Specified by:
        getSrcPort in interface Flow
      • getTcpFlags

        public java.lang.Integer getTcpFlags()
        Description copied from interface: Flow
        TCP Flags.
        Specified by:
        getTcpFlags in interface Flow
      • getTos

        public java.lang.Integer getTos()
        Description copied from interface: Flow
        TOS.
        Specified by:
        getTos in interface Flow
      • getVlan

        public java.lang.Integer getVlan()
        Description copied from interface: Flow
        VLAN ID.
        Specified by:
        getVlan in interface Flow
      • getNodeIdentifier

        public java.lang.String getNodeIdentifier()
        Description copied from interface: Flow
        Method to get node lookup identifier. This field can be used as an alternate means to identify the exporter node when the source address of the packets are altered due to address translation. * @return the identifier
        Specified by:
        getNodeIdentifier in interface Flow