public class KrakenProtocolConfigurationBuilderImpl.KrakenProtocolConfigurationImpl extends Object implements KrakenProtocolConfiguration
KrakenProtocolConfigurationBuilderImpl
.
This implementation relies on the fact that all registered protocol handlers (even custom handlers) define
a default constructor. All handlers may utilize information of this configuration by overriding the
KrakenBaseProtocol.initialize(at.jku.fim.rubanetra.config.model.KrakenProtocolConfiguration)
method, which will be called as soon as possible after construction.
Further note, that this implementation tries to reduce the number of protocol handler instances. The current
mechanism first takes an unbound protocol id of the binding map, constructs an instance and saves this reference
for the provided protocol id.
Constraints: The call of the initialization method is in general unordered. However, it is always ensured that for a given binding 'from'->'to', the protocol handler for 'from' is constructed and initialized before 'to'. Double bindings 'from'->'to' + 'to'->'from' _should_ be possible, but must be handled carefully (untested). All bindings are performed after initialization by calling 'from'.bind('to'). All handlers are responsible to take care of the concrete binding and must handle unsupported bindings appropriately.
Modifier and Type | Method and Description |
---|---|
Map<ProtocolId,KrakenBaseProtocol> |
getBoundProtocols()
Represents a primitive protocol to Kraken-protocol decoder mapping mechanism.
|
PcapHandler<PcapActivityListener> |
getPcapHandler()
The underlying source of all PCAP-packets for this application layer protocol.
|
PortSpecification |
getPortSpecification()
|
KrakenTransportLayerMappingFactory |
getTransportLayerMappingFactory()
This
KrakenTransportLayerMappingFactory may be used
by the KrakenBaseProtocol parsers
to obtain instances of the configured KrakenProtocolConfiguration.getTransportLayerMappingStrategy() . |
String |
getTransportLayerMappingStrategy()
The transport layer mapping strategy to use for this Kraken-application layer protocol decoder.
|
public Map<ProtocolId,KrakenBaseProtocol> getBoundProtocols()
KrakenProtocolConfiguration
ProtocolId
. Therefore a mapping of a protocol to
an appropriate Kraken-protocol decoder/parser is needed. All
KrakenBaseProtocol
implementations provide a method to
retrieve a suitable identifier
BaseProtocol.getProtocolId()
.
These bindings may be configured by using a
KrakenProtocolConfigurationBuilderImpl
.getBoundProtocols
in interface KrakenProtocolConfiguration
public String getTransportLayerMappingStrategy()
KrakenProtocolConfiguration
getTransportLayerMappingStrategy
in interface KrakenProtocolConfiguration
TransportLayerMappingStrategy
by using
KrakenTransportLayerMappingFactory
.public PortSpecification getPortSpecification()
KrakenProtocolConfiguration
PortRange
s or
Port
s which filters packets at the transport layer
for this application layer protocol. A simpler alternative to this method is the use of
PortSpecification.UniversalPortSpecification
and
by restricting all transport layer packets globally via a BP-Filter,
see PcapHandler
.getPortSpecification
in interface KrakenProtocolConfiguration
PortSpecification
as a transport layer
filter for this application layer protocol onlyPortSpecification.UniversalPortSpecification
public PcapHandler<PcapActivityListener> getPcapHandler()
KrakenProtocolConfiguration
PcapActivity
-objects.
All parsed PCAP-packets will be either parsed by a Kraken-Application layer parser for this protocol or
discarded by the transport layer mapping strategy and/or port-specification.getPcapHandler
in interface KrakenProtocolConfiguration
PcapHandler
to use as input stream for
PcapActivity
-objects.KrakenProtocolConfiguration.getTransportLayerMappingStrategy()
,
KrakenProtocolConfiguration.getPortSpecification()
public KrakenTransportLayerMappingFactory getTransportLayerMappingFactory()
KrakenProtocolConfiguration
KrakenTransportLayerMappingFactory
may be used
by the KrakenBaseProtocol
parsers
to obtain instances of the configured KrakenProtocolConfiguration.getTransportLayerMappingStrategy()
.getTransportLayerMappingFactory
in interface KrakenProtocolConfiguration
Copyright © 2013–2015 Institute of networks and security. All rights reserved.