public abstract class

MalformedPacketHandler

extends Object
java.lang.Object
   ↳ com.commsignia.v2x.client.MalformedPacketHandler

Class Overview

Represents a malformed packet handler which enables the user of the library to have more fine-grained control over how the client library handles malformed packets. The default handler disconnects from the server and shuts down the client.

Summary

Nested Classes
enum MalformedPacketHandler.Action Represents the three possible course of action when dealing with a malformed packet. 
Fields
public static final MalformedPacketHandler DEFAULT The default implementation for the malformed packet handler.
public static final MalformedPacketHandler FAIL Convenience handler that always returns FAIL.
public static final MalformedPacketHandler IGNORE Convenience handler that always returns IGNORE.
public static final MalformedPacketHandler RECONNECT Convenience handler that always returns RECONNECT.
Public Constructors
MalformedPacketHandler()
Public Methods
abstract MalformedPacketHandler.Action handle(int seq, byte[] payload)
Implement this method to specify the course of action to take when the client receives a malformed packet.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final MalformedPacketHandler DEFAULT

The default implementation for the malformed packet handler. Disconnects and shut down the client.

public static final MalformedPacketHandler FAIL

Convenience handler that always returns FAIL.

public static final MalformedPacketHandler IGNORE

Convenience handler that always returns IGNORE.

public static final MalformedPacketHandler RECONNECT

Convenience handler that always returns RECONNECT.

Public Constructors

public MalformedPacketHandler ()

Public Methods

public abstract MalformedPacketHandler.Action handle (int seq, byte[] payload)

Implement this method to specify the course of action to take when the client receives a malformed packet.

Parameters
seq sequence number of the command
payload payload of the command
Returns
  • course of action to take