Packages

c

org.cert.netsa.io.ipfix

StreamSession

final class StreamSession extends Session

There are two types of Sessions: StreamSession and DatagramSession.

A StreamSession implements Template instantiation and Template withdrawal handling as dictated by sections 8 and 8.1 of RFC 7011. In particular, Session.TemplateInterferenceException is thrown when different templates use the same template id.

A StreamSession is created by a SessionGroup with the streamSemantics parameter set to true.

Exceptions thrown

Session.TemplateInterferenceException when different templates use the same template id.

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

Instance Constructors

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

    group

    The session group that owns the session.

    id

    The observation domain ID.

    Exceptions thrown

    Session.TemplateInterferenceException when different templates use the same template id.

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(t: 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.

    Definition Classes
    StreamSessionSession
    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.

    Definition Classes
    Session
  6. final def apply(template: Template): Int

    The ID used by template within this Session.

    The ID used by template within this Session.

    Definition Classes
    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.

    Definition Classes
    Session
    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.

    Definition Classes
    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

    Definition Classes
    Session
  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.

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

    Definition Classes
    Session
  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

    Definition Classes
    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

    Definition Classes
    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

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

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

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

    Definition Classes
    Session
  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
    Definition Classes
    Session
  23. final val infoModel: InfoModel
    Definition Classes
    Session
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. final def iterator: Iterator[Template]

    Returns an Iterator over the Templates in the Session.

    Returns an Iterator over the Templates in the Session.

    Definition Classes
    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.

    Definition Classes
    Session
  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
    Definition Classes
    Session
  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

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

    Registers multiple templates callbacks with this session.

    Registers multiple templates callbacks with this session.

    Definition Classes
    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

    Definition Classes
    Session
  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

    Definition Classes
    Session
  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

    Definition Classes
    Session
  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
    Definition Classes
    Session
  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
    Definition Classes
    Session
  40. def toString(): String
    Definition Classes
    AnyRef → Any
  41. final val transport: AnyRef
    Definition Classes
    Session
  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
    Definition Classes
    Session

Inherited from Session

Inherited from StrictLogging

Inherited from AnyRef

Inherited from Any

Ungrouped