Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Class TCPTransport

Hierarchy

java.lang.Object
     com.smartdevicelink.transport.SdlTransport

Package
com.smartdevicelink.transport

Overview

Class that implements TCP transport

Constructors

TCPTransport( TCPTransportConfig tcpTransportConfig, ITransportListener transportListener )

Constructs TCP transport component instance

public TCPTransport(TCPTransportConfig tcpTransportConfig,ITransportListener transportListener)

Parameters

tcpTransportConfig
Instance of the TCP transport configuration
transportListener
Listener that will be notified on different TCP transport activities

Methods

sendBytesOverTransport( SdlPacket packet )

Performs actual work of sending array of bytes over the transport

protected boolean sendBytesOverTransport(SdlPacket packet)

Parameters

packet

openConnection()

Tries to open connection to SmartDeviceLinkCore. Actual try will be performed only if no actual connection is available

public void openConnection() throws com.smartdevicelink.exception.SdlException

Throws

disconnect()

Tries to disconnect from SmartDeviceLinkCore. Actual try will be performed only if connection is available

public void disconnect()

getTransportType()

Overridden abstract method which returns specific type of this transport.

public com.smartdevicelink.transport.enums.TransportType getTransportType()

logInfo( String message )

Internal method for logging information messages

protected void logInfo(String message)

Parameters

message
Message to log

logError( String message )

Internal method for logging error messages

protected void logError(String message)

Parameters

message
Message to log

logWarning( String message )

Internal method for logging warning messages

protected void logWarning(String message)

Parameters

message
Message to log

logError( String message, Throwable throwable )

Internal method for logging error message together with information about exception that was the reason of it

protected void logError(String message,Throwable throwable)

Parameters

message
Message to log
throwable
Exception, that was the main reason for logged error message

getBroadcastComment()

public java.lang.String getBroadcastComment()

Inherited Methods

From Class Methods
com.smartdevicelink.transport.SdlTransport getIsConnected, handleReceivedPacket, sendBytesOverTransport, sendBytes, handleTransportConnected, handleTransportDisconnected, handleTransportError, openConnection, disconnect, getTransportType, getBroadcastComment
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section