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

Class TransportBroker

Hierarchy

java.lang.Object

Package
com.smartdevicelink.transport
All Known Subclasses
com.smartdevicelink.transport.TransportManager.TransportBrokerImpl

Constructors

TransportBroker( Context context, String appId, ComponentName service )

Life Cycle **************************************************************

public TransportBroker(Context context,String appId,ComponentName service)

Parameters

context
appId
service

Methods

sendMessageToRouterService( Message message )

protected synchronized boolean sendMessageToRouterService(Message message)

Parameters

message

sendMessageToRouterService( Message message, int retryCount )

protected synchronized boolean sendMessageToRouterService(Message message,int retryCount)

Parameters

message
retryCount

start()

This beings the initial connection with the router service.

public boolean start()

resetSession()

public void resetSession()

stop()

This method will end our communication with the router service.

public void stop()

onServiceUnregsiteredFromRouterService( int unregisterCode )

Event Callbacks **************************************************************

public void onServiceUnregsiteredFromRouterService(int unregisterCode)

Parameters

unregisterCode

onHardwareDisconnected( TransportType type )

Deprecated

public void onHardwareDisconnected(TransportType type)

Parameters

type

onHardwareDisconnected( TransportRecord record, java.util.List<com.smartdevicelink.transport.utl.TransportRecord> connectedTransports )

public void onHardwareDisconnected(TransportRecord record,java.util.List<com.smartdevicelink.transport.utl.TransportRecord> connectedTransports)

Parameters

record
connectedTransports

onHardwareConnected( TransportType type )

Deprecated
WILL NO LONGER BE CALLED

public boolean onHardwareConnected(TransportType type)

Parameters

type

onHardwareConnected( java.util.List<com.smartdevicelink.transport.utl.TransportRecord> transports )

public boolean onHardwareConnected(java.util.List<com.smartdevicelink.transport.utl.TransportRecord> transports)

Parameters

transports

onPacketReceived( Parcelable packet )

public void onPacketReceived(Parcelable packet)

Parameters

packet

onLegacyModeEnabled()

public void onLegacyModeEnabled()

sendPacketToRouterService( SdlPacket packet )

public boolean sendPacketToRouterService(SdlPacket packet)

Parameters

packet

getRouterService()

protected android.content.ComponentName getRouterService()

convertAppId( String appId )

public static java.lang.Long convertAppId(String appId)

Parameters

appId

enableLegacyMode( boolean enable )

protected void enableLegacyMode(boolean enable)

Parameters

enable

isLegacyModeEnabled()

protected static boolean isLegacyModeEnabled()

requestNewSession()

Deprecated
Use this method to let the router service know that you are requesting a new session from the head unit.

public void requestNewSession()

requestNewSession( TransportRecord transportRecord )

public void requestNewSession(TransportRecord transportRecord)

Parameters

transportRecord

requestSecondaryTransportConnection( byte sessionId, Bundle bundle )

Request secondary transport and communicate details to router service

public void requestSecondaryTransportConnection(byte sessionId,Bundle bundle)

Parameters

sessionId
bundle

removeSession( long sessionId )

public void removeSession(long sessionId)

Parameters

sessionId

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