final case class SessionGroup(infoModel: InfoModel, transport: AnyRef, streamSessions: Boolean = true) extends Product with Serializable
A SessionGroup
maintains a set of Sessions for a
single transport session. Put more carefully, it maintains a
group of sessions that can be distinguished solely by an
observation domain identifier.
A SessionGroup is created to create either StreamSessions or DatagramSessions. A StreamSession is used when reading data from files or over TCP; it supports template withdrawal and re-use of a template ID raises an exception. A DatagramSession is used when reading data over UDP; it does not support template withdrawal and re-use of template IDs is permitted.
transport
is an object may be used to describe the transport, such as an
InetSocketAddress for network transports or a Path for a file transport.
It may be null. The SessionGroup does not use this parameter, and the
caller may use it however it chooses.
Creates a session group. Each new session in the group will be created using the given session factory.
- infoModel
the information model
- transport
an object that describes the transport of the transport session. It will be an InetSocketAddress for network transports, or a Path for a file transport. May be null.
- streamSessions
true
when the group is used to read data from a file or over TCP (creates a StreamSession), andfalse
for reading data over UDP (creates a DatagramSession).
- Alphabetic
- By Inheritance
- SessionGroup
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SessionGroup(infoModel: InfoModel, transport: AnyRef, streamSessions: Boolean = true)
- infoModel
the information model
- transport
an object that describes the transport of the transport session. It will be an InetSocketAddress for network transports, or a Path for a file transport. May be null.
- streamSessions
true
when the group is used to read data from a file or over TCP (creates a StreamSession), andfalse
for reading data over UDP (creates a DatagramSession).
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getOrCreateSession(domain: Int): Session
Retrieves a session from the group.
Retrieves a session from the group. If a session with the given domain is not found, creates it, adds it, and returns the new session.
- domain
an observation domain identifier
- returns
the session associated with the domain
- def getSession(domain: Int): Option[Session]
Retrieves a session from the group as an Option.
Retrieves a session from the group as an Option.
- domain
an observation domain identifier
- returns
the session associated with the domain, or
None
if there is no such session
- def hasSession(domain: Int): Boolean
Determines whether group is maintaining a session matching the given domain.
Determines whether group is maintaining a session matching the given domain.
- domain
an observation domain identifier
- returns
true
if this group has a session for the domain
- val infoModel: InfoModel
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterator: Iterator[Session]
Returns an iterator over the Sessions in the SessionGroup.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def register(callback: TemplateCallback): Unit
Registers a new template callback.
Registers a new template callback.
A session group may have any number of callbacks registered to it. Each registered callback is added to new sessions created by this session group.
- callback
the template callback
- def retireSession(domain: Int): Boolean
Removes a session from the group.
Removes a session from the group.
- domain
an observation domain identifier
- returns
true
if the group previously contained a session for the domain
- val streamSessions: Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val transport: AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
This is documentation for Mothra, a collection of Scala and Spark library functions for working with Internet-related data. Some modules contain APIs of general use to Scala programmers. Some modules make those tools more useful on Spark data-processing systems.
Please see the documentation for the individual packages for more details on their use.
Scala Packages
These packages are useful in Scala code without involving Spark:
org.cert.netsa.data
This package, which is collected as the
netsa-data
library, provides types for working with various kinds of information:org.cert.netsa.data.net
- types for working with network dataorg.cert.netsa.data.time
- types for working with time dataorg.cert.netsa.data.unsigned
- types for working with unsigned integral valuesorg.cert.netsa.io.ipfix
The
netsa-io-ipfix
library provides tools for reading and writing IETF IPFIX data from various connections and files.org.cert.netsa.io.silk
To read and write CERT NetSA SiLK file formats and configuration files, use the
netsa-io-silk
library.org.cert.netsa.util
The "junk drawer" of
netsa-util
so far provides only two features: First, a method for equipping Scala scala.collection.Iterators with exception handling. And second, a way to query the versions of NetSA libraries present in a JVM at runtime.Spark Packages
These packages require the use of Apache Spark:
org.cert.netsa.mothra.datasources
Spark datasources for CERT file types. This package contains utility features which add methods to Apache Spark DataFrameReader objects, allowing IPFIX and SiLK flows to be opened using simple
spark.read...
calls.The
mothra-datasources
library contains both IPFIX and SiLK functionality, whilemothra-datasources-ipfix
andmothra-datasources-silk
contain only what's needed for the named datasource.org.cert.netsa.mothra.analysis
A grab-bag of analysis helper functions and example analyses.
org.cert.netsa.mothra.functions
This single Scala object provides Spark SQL functions for working with network data. It is the entirety of the
mothra-functions
library.