Class/Object

org.cert.netsa.io.ipfix

Session

Related Docs: object Session | package ipfix

Permalink

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
Known Subclasses
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. All

Instance Constructors

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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add(template: Template, tid: Int): Option[Template]

    Permalink

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

    template

    The template to add.

    tid

    The ID for the template.

    returns

    The template being replaced, or None

    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.

  5. def addTemplateMetadata(metadata: TemplateMetadata): Unit

    Permalink

    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

    Permalink

    Gets the ID used by template within this Session.

    Gets 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

    Permalink

    Gets a Template from the template library based on the template ID.

    Gets a Template from the template library based on the 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

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. var expectedSequence: Long

    Permalink

    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

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

    Permalink

    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[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def getId(template: Template): Option[Int]

    Permalink

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

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

    Permalink

    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

    Permalink

    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]

    Permalink

    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]

    Permalink

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

  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. final var idGetTmpl: TrieMap[Int, Template]

    Permalink

    Maps a templateId to a Template.

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

    Attributes
    protected
  23. final val infoModel: InfoModel

    Permalink

    The information model used by the session.

  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. final def iterator: Iterator[Template]

    Permalink

    Returns an Iterator over the Templates in the Session.

  26. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    StrictLogging
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def noteMessage(m: Message): Unit

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final val observationDomain: Int

    Permalink

    The observation domain for the session, an unsigned 32-bit value.

    The observation domain for the session, an unsigned 32-bit value. Transport sessions that have a single observation domain typically have an observation domain ID of zero.

  32. def register(callback: SequenceCallback): Unit

    Permalink

    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

    Permalink

    Registers multiple templates callbacks with this session.

  34. def register(callback: TemplateCallback): Unit

    Permalink

    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]

    Permalink

    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]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  38. final var templateMetadata: TrieMap[Int, TemplateMetadata]

    Permalink

    Maps a templateId to its metadata

    Maps a templateId to its metadata

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

    Permalink

    Maps a Template to its templateId in this Session.

    Maps a Template to its templateId in this Session.

    Attributes
    protected
  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. final val transport: AnyRef

    Permalink

    The source information for this session.

    The source information for this session. If the source is a file, transport is a String containing the file name. If the source is a network connection, transport is an InetSocketAddress representing the remote side of this session's connection.

  42. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def withdraw(t: Template, tid: Int): Option[Template]

    Permalink

    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