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

Class CustomTransport

Hierarchy

java.lang.Object

Package
com.smartdevicelink.transport
All Implemented Interfaces
com.smartdevicelink.transport.TransportInterface

Constructors

CustomTransport( String address )

public CustomTransport(String address)

Parameters

address

Methods

getTransportRecord()

public com.smartdevicelink.transport.utl.TransportRecord getTransportRecord()

onByteArrayReceived( byte[] bytes, int offset, int length )

Call this method when reading a byte array off the transport

public synchronized void onByteArrayReceived(byte[] bytes,int offset,int length)

Parameters

bytes
the bytes read off the transport
offset
length

onByteBufferReceived( ByteBuffer message )

Call this method when reading a ByteBuffer off the transport

public synchronized void onByteBufferReceived(ByteBuffer message)

Parameters

message
the byte buffer that was read off the transport

start()

public void start()

stop()

public void stop()

write( SdlPacket packet )

public void write(SdlPacket packet)

Parameters

packet

setCallback( TransportCallback transportCallback )

public void setCallback(TransportCallback transportCallback)

Parameters

transportCallback

onError()

public void onError()

onWrite( byte[] bytes, int offset, int length )

Integrator should write out these bytes to whatever actual transport there is. This will be called from the internals of the library.

public abstract void onWrite(byte[] bytes,int offset,int length)

Parameters

bytes
a deconstructed packet into a byte array that needs to be written out
offset
in bytes
length
in bytes

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section