Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.packetlogging
Interface PacketLoggingService

All Known Implementing Classes:
PacketLoggingServiceImpl

public interface PacketLoggingService

A Packet Logging Service to log packets that were send/received by protocols or any other network related services in various formats. Its for debugging purposes.

Author:
Damian Minkov

Nested Class Summary
static class PacketLoggingService.ProtocolName
          These are the services that this packet logging service cab handle.
static class PacketLoggingService.TransportName
          The transport names.
 
Method Summary
 PacketLoggingConfiguration getConfiguration()
          Returns the current Packet Logging Configuration.
 boolean isLoggingEnabled()
          Checks is logging globally enabled for the service.
 boolean isLoggingEnabled(PacketLoggingService.ProtocolName protocol)
          Checks is logging globally enabled for and is it currently available fo the given protocol.
 void logPacket(PacketLoggingService.ProtocolName protocol, byte[] sourceAddress, int sourcePort, byte[] destinationAddress, int destinationPort, PacketLoggingService.TransportName transport, boolean sender, byte[] packetContent)
          Log a packet with all the required information.
 void logPacket(PacketLoggingService.ProtocolName protocol, byte[] sourceAddress, int sourcePort, byte[] destinationAddress, int destinationPort, PacketLoggingService.TransportName transport, boolean sender, byte[] packetContent, int packetOffset, int packetLength)
          Log a packet with all the required information.
 

Method Detail

isLoggingEnabled

boolean isLoggingEnabled()
Checks is logging globally enabled for the service.

Returns:
is logging enabled.

isLoggingEnabled

boolean isLoggingEnabled(PacketLoggingService.ProtocolName protocol)
Checks is logging globally enabled for and is it currently available fo the given protocol. .

Parameters:
protocol - that is checked.
Returns:
is logging enabled.

logPacket

void logPacket(PacketLoggingService.ProtocolName protocol,
               byte[] sourceAddress,
               int sourcePort,
               byte[] destinationAddress,
               int destinationPort,
               PacketLoggingService.TransportName transport,
               boolean sender,
               byte[] packetContent)
Log a packet with all the required information.

Parameters:
protocol - the source protocol that logs this packet.
sourceAddress - the source address of the packet.
sourcePort - the source port of the packet.
destinationAddress - the destination address.
destinationPort - the destination port.
transport - the transport this packet uses.
sender - are we the sender of the packet or not.
packetContent - the packet content.

logPacket

void logPacket(PacketLoggingService.ProtocolName protocol,
               byte[] sourceAddress,
               int sourcePort,
               byte[] destinationAddress,
               int destinationPort,
               PacketLoggingService.TransportName transport,
               boolean sender,
               byte[] packetContent,
               int packetOffset,
               int packetLength)
Log a packet with all the required information.

Parameters:
protocol - the source protocol that logs this packet.
sourceAddress - the source address of the packet.
sourcePort - the source port of the packet.
destinationAddress - the destination address.
destinationPort - the destination port.
transport - the transport this packet uses.
sender - are we the sender of the packet or not.
packetContent - the packet content.
packetOffset - the packet content offset.
packetLength - the packet content length.

getConfiguration

PacketLoggingConfiguration getConfiguration()
Returns the current Packet Logging Configuration.

Returns:
the Packet Logging Configuration.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.