1 package com.smartdevicelink.protocol;
\r
3 import com.smartdevicelink.protocol.enums.*;
\r
5 public interface IProtocolListener {
\r
6 // Called to indicate that these bytes are to be sent as part of a message.
\r
7 // This call includes the part of the message.
\r
8 void onProtocolMessageBytesToSend(byte[] msgBytes, int offset, int length);
\r
10 // Called to indicate that a complete message (RPC, BULK, etc.) has been
\r
11 // received. This call includes the message.
\r
12 void onProtocolMessageReceived(ProtocolMessage msg);
\r
14 // Called to indicate that a protocol session has been started (from either side)
\r
15 void onProtocolSessionStarted(SessionType sessionType, byte sessionID, byte version, String correlationID);
\r
17 // Called to indicate that a protocol session has ended (from either side)
\r
18 void onProtocolSessionEnded(SessionType sessionType, byte sessionID, String correlationID /*, String info, Exception ex*/);
\r
20 // Called to indicate that a protocol error was detected in received data.
\r
21 void onProtocolError(String info, Exception e);
\r