public abstract class BasePacketConverter extends Object implements IPacketConverter
IPacketConverter that stores the context passed to
the BasePacketConverter.initialize(IPacketConverterContext).| Constructor and Description |
|---|
BasePacketConverter() |
| Modifier and Type | Method and Description |
|---|---|
void |
complete()
This implementation does nothing.
|
void |
dispose()
This implementation does nothing.
|
protected IPacketConverterContext |
getContext()
Returns the context of this packet converter.
|
Set<String> |
getOutputPacketTypes(Set<String> inputPacketTypes)
This implementation returns the set that was passed as an argument.
|
void |
initialize(IPacketConverterContext context)
Stores the context so it can be later accessed using
BasePacketConverter.getContext(). |
void |
writePacket(IRecorderPacketReference ref,
long minPendingPacketTime)
This implementation sends the packet to this converter output, with no
additional transformation.
|
public Set<String> getOutputPacketTypes(Set<String> inputPacketTypes)
getOutputPacketTypes in interface IPacketConverterinputPacketTypes - A set of packet types.public void initialize(IPacketConverterContext context) throws CoreException
BasePacketConverter.getContext().
This method can be overridden, but the implementation should invoke its super
implementation.initialize in interface IPacketConvertercontext - The context that can be used by the packet converter to read its
configuration, retrieve its output stream or create attachments. At this time the
converter may not emit packet (IPacketConverterContext.getOutputStream()
will return null).CoreExceptionprotected final IPacketConverterContext getContext()
public void complete()
throws IOException
complete in interface IPacketConverterIOExceptionpublic void writePacket(IRecorderPacketReference ref, long minPendingPacketTime) throws IOException
writePacket in interface IPacketReferenceOutputStreamminPendingPacketTime - The lowest start time of all packets that
may be sent to this output after the current one. If all packets are
expected to be written sorted by their start timestamp, then this value
should be greater or equal than the start timestamp of the current packet.IOExceptionpublic void dispose()
dispose in interface IPacketConverter© Copyright IBM Corp. 2013. All rights reserved.