Packages

sealed class Session extends StrictLogging

A session contains information about a single IPFIX session, from a single observation Domain. Specifically, a session takes care of handling the template library that maps template IDs to templates, and it keeps track of message sequence numbers.

The Session class's contructor is not accessible. Instead these classes must be used: The StreamSession is used when reading data from a file or from a TCP stream. The DatagramSession is used when reading data over UDP.

See also

The companion object for additional details.

Linear Supertypes
StrictLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Session
  2. StrictLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Session(group: SessionGroup, id: Int)

    Auxiliary constructor

    Auxiliary constructor

    Creates a new session from the given session group and observation domain ID. The new session creates a new information model that inherits from the SessionGroup's information model.

    group

    the session group that owns the session

    id

    the observation domain ID

    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(template: Template, tid: Int): Option[Template]

    Adds a Template to this Session using tid as the templateId and replacing the Template that previously used that ID, if any.

    Adds a Template to this Session using tid as the templateId and replacing the Template that previously used that ID, if any. If a Template is replaced, it is returned.

    To add template only if it is not already present, use getOrAdd.

    If template.size is 0, withdraws and returns the Template whose ID is tid. The Template if not withdrawn if this is a DatagramSession.

    Exceptions thrown

    Session.TemplateInterferenceException when a template is replaced that may not be replaced, by policy.

    java.lang.RuntimeException when the Template's session is not this session.

  5. def addTemplateMetadata(metadata: TemplateMetadata): Unit

    Updates the metadata for a particular template in this Session.

    Updates the metadata for a particular template in this Session. Ignores metadata if its template ID is invalid.

  6. final def apply(template: Template): Int

    The ID used by template within this Session.

    The ID used by template within this Session.

    Since

    1.3.1

    Exceptions thrown

    NoTemplateException if the Session does not know about that Template.

    See also

    getId

  7. final def apply(tid: Int): Template

    The Template from the template library with this template ID.

    The Template from the template library with this template ID.

    Since

    1.3.1

    Exceptions thrown

    NoTemplateException if the Session does not have a Template with that ID.

    See also

    getTemplate

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. var expectedSequence: Long

    The sequence number that is expected for the next message in this session.

    The sequence number that is expected for the next message in this session.

    It is value a value between 0 and 2^32-1, or -1 if no message has yet been observed in this session.

  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def findUnusedId(): Option[Int]

    Find a template ID not currently being used by this session.

    Find a template ID not currently being used by this session. Returns None when the Session has no available IDs. (Not necessarily deterministic.)

    returns

    a currently unused template ID

  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def getId(template: Template): Option[Int]

    Gets the ID for the Template within this session as an Option.

  17. def getOrAdd(template: Template, tid: Option[Int] = None): Int

    Returns the ID for template in this Session, adding template to this Session if it does not exist.

    Returns the ID for template in this Session, adding template to this Session if it does not exist.

    If template must be added to the Session, an arbitrary ID is used when tid is None. If tid is not None, that ID is used if possible; otherwise an arbitrary ID is used. Use the add method if template must use a particular ID.

    Takes no action and returns 0 if template.size is 0.

    template

    The Template to get or add

    tid

    An optional ID for template if it does not exist in the Session

    returns

    The ID of template in this Session

  18. def getPersistentSession(): Session

    Returns a read-only copy of this session that will not change.

    Returns a read-only copy of this session that will not change.

    returns

    the persistent session

  19. final def getTemplate(tid: Int): Option[Template]

    Gets a Template from the template library based on the template ID as an Option.

    Gets a Template from the template library based on the template ID as an Option.

    tid

    the template ID

    returns

    The template associated with the template ID, or None

  20. def getTemplateMetadata(tid: Int): Option[TemplateMetadata]

    Gets the metadata for the Template whose ID is tid as an Option.

  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final var idGetTmpl: TrieMap[Int, Template]

    Maps a templateId to a Template.

    Maps a templateId to a Template. "protected" since ReadOnlySession needs access

    Attributes
    protected
  23. final val infoModel: InfoModel
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. final def iterator: Iterator[Template]

    Returns an Iterator over the Templates in the Session.

  26. val logger: Logger
    Attributes
    protected
    Definition Classes
    StrictLogging
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def noteMessage(m: Message): Unit

    Check for missing or out of sequence records.

    Check for missing or out of sequence records. If found, invoke any SequenceCallback objects that have been registered and log a message. A log message is not written if no SequenceCallback objects have been registered.

  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final val observationDomain: Int
  32. def register(callback: SequenceCallback): Unit

    Registers a new sequence callback with this session.

    Registers a new sequence callback with this session. A session can have any number of callbacks registered to it. Each registered callback will be called whenever a message arrives with an unexpected sequence number.

    callback

    the sequence number callback

  33. def register(callback: Iterable[TemplateCallback]): Unit

    Registers multiple templates callbacks with this session.

  34. def register(callback: TemplateCallback): Unit

    Registers a new template callback with this session.

    Registers a new template callback with this session. A session can have any number of callbacks registered to it. Each registered callback will be called whenever a template is added or removed from the session template library.

    callback

    the template callback

  35. def remove(template: Template): Option[Template]

    Removes a template from this session.

    Removes a template from this session.

    template

    The template to remove

    returns

    the template that was removed, or None if none

  36. def remove(tid: Int): Option[Template]

    Removes a template from this session.

    Removes a template from this session.

    tid

    the template ID of the template to remove

    returns

    the template that was removed, or None if none

  37. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  38. final var templateMetadata: TrieMap[Int, TemplateMetadata]

    Maps a templateId to its metadata

    Maps a templateId to its metadata

    Attributes
    protected
  39. final var tmplGetId: TrieMap[Template, Int]

    Maps a Template to its templateId in this Session.

    Maps a Template to its templateId in this Session.

    Attributes
    protected
  40. def toString(): String
    Definition Classes
    AnyRef → Any
  41. final val transport: AnyRef
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  45. def withdraw(t: Template, tid: Int): Option[Template]

    Internal function that removes a template when a withdrawal template is received on the input stream.

    Internal function that removes a template when a withdrawal template is received on the input stream. That is, when add() is called with a withdrawal template.

    Attributes
    protected

Inherited from StrictLogging

Inherited from AnyRef

Inherited from Any

Ungrouped