Packages

class ExportStream extends AnyRef

ExportStream supports writing IPFIX templates and records to a file.

The caller creates an ExportStream instance with an output channel and an associated Session. The caller may then add Templates or Records to the ExportStream, and the ExportStream writes the IPFIX data to the output file.

Since the Session is part of the ExportStream's constructor, all IPFIX Messages in the stream use the same observation domain.

By default, each exported IPFIX Message uses the current time as its timestamp. Set the makeTimestamp variable to change this behavior.

By default, an ExportStream adds an options record to describe each Information Element that is not part of the standard information model, and ExportStream ignores any such options records in the input stream. Set the describeElements variable to false to change this behavor, and use elementDescriptionTID to view or set the template ID used by these records.

By default, an ExportStream adds an options record to describe each Template it exports, and ExportStream ignores any such options records in the input stream. Set the describeTemplates variable to false to change this behavor, and use templateDescriptionTID to view or set the template ID used by these records.

NOTE: When copying data from an IPFIX input stream, ExportStream may change the order in which templates and records appear---specifically, templates that appear after a record in the input may be written before that record. ExportStream is aware of the Meta-Data Options templates and records that describe Information Elements and Templates, and, when ExportStream is not creating and exporting those items itself, those templates and records are copied from the input and written to the output in the required order. The user may call flush() to ensure some items appear in the output before others. The authors of this package may need to consider providing some way for the users to know when to call flush(), such as adding a callback methods to be invoked when a new IpfixSet is read.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExportStream
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ExportStream(out: WritableByteChannel, session: Session)

    out

    Where to write the IPFIX data.

    session

    The session to use.

    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(reader: MessageReader): ExportStream

    Add all records from a MesageReader to this ExportStream

  5. def add(record: Record): ExportStream

    Adds record to the output stream.

    Adds record to the output stream. Prior to adding record, adds any Templates used by record that have not been seen before.

    If record appears to contain either information element meta-data or template meta-data, then the record is ignored if the Export Stream is exporting that meta-data itself (see the describeElements and describeTemplates variables).

  6. def add(template: Template): ExportStream

    Adds template to the output stream unless the template has already been seen by this stream.

    Adds template to the output stream unless the template has already been seen by this stream.

    If template appears to be a template for describing either information element meta-data or template meta-data, then the template is ignored if the Export Stream is exporting that meta-data itself (see the describeElements and describeTemplates variables).

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def close(): Unit

    Flushes and closes the output stream.

  10. def dataWrittenCallback: Option[DataWrittenCallback]

    Gets the current callback invoked when bytes are written to the outputStream as an Option.

    Gets the current callback invoked when bytes are written to the outputStream as an Option.

    Since

    1.3.1

  11. def dataWrittenCallback_=(callback: DataWrittenCallback): Unit

    Sets a callback to be invoked when bytes are written to the outputStream.

    Sets a callback to be invoked when bytes are written to the outputStream.

    Since

    1.3.1

  12. var describeElements: Boolean

    Whether to export option records that describe private enterprise information elements.

    Whether to export option records that describe private enterprise information elements.

    If this is true, ExportStream generates these records itself and any such records given to the add method are ignored. The records are generated as-needed and may appear anywhere in the output.

    If this is false, input records that describe private enterprise elements are written to the output without ExportStream examining their content. This may result in duplicate descriptions in the output.

    In either case, ExportStream attempts to use the same template ID for the element metadata template as seen in the incoming data.

  13. var describeTemplates: Boolean

    Whether to export option records that include the name and description of each template.

    Whether to export option records that include the name and description of each template.

    If this is true, ExportStream generates these records itself and any such records given to the add method are ignored. The records are generated as-needed and may appear anywhere in the output.

    If this is false, input records that describe templates are written to the output without ExportStream examining their content. This may result in duplicate descriptions in the output.

    In either case, ExportStream attempts to use the same template ID for the template metadata template as seen in the incoming data.

  14. def elementDescriptionTID: Option[Int]

    Returns the template ID for the options template used by records that describe private enterprise information elements.

    Returns the template ID for the options template used by records that describe private enterprise information elements. Returns scala.None if no ID has been assigned.

  15. def elementDescriptionTID_=(tid: Int): Unit

    Sets the template ID for the options template used by records that describe private enterprise information elements and exports the template to ensure the template ID is reserved.

    Sets the template ID for the options template used by records that describe private enterprise information elements and exports the template to ensure the template ID is reserved.

    Exceptions thrown

    IllegalTemplateRecordException when tid is illegal or is already in use by the session.

    java.lang.RuntimeException when tid cannot be used for the template because the template already exists.

  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  19. def flush(): ExportStream

    Flushes any data currently sitting in memory.

  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. var knownTmpl: Set[Template]

    The set of templates that have been exported

  24. var makeTimestamp: MessageTimestamp

    Callback to generate a timestamp

  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. def outputStream: WritableByteChannel

    Returns the file channel to which the data is being written

  29. def recordCount: Int

    Returns the number of data records added to the stream.

  30. val session: Session
  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def templateCount: Int

    Returns the number of templates added to the stream.

  33. def templateDescriptionTID: Option[Int]

    Returns the template ID for the options template used by records that describe templates.

    Returns the template ID for the options template used by records that describe templates. Returns scala.None if no ID has been assigned.

  34. def templateDescriptionTID_=(tid: Int): Unit

    Sets the template ID for the options template used by records that describe templates and exports the template to ensure the template ID is reserved.

    Sets the template ID for the options template used by records that describe templates and exports the template to ensure the template ID is reserved.

    Exceptions thrown

    IllegalTemplateRecordException when tid is illegal or is already in use by the session.

    java.lang.RuntimeException when tid cannot be used for the template because the template already exists.

  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped