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

Class SdlSession

Hierarchy

java.lang.Object

Package
com.smartdevicelink.SdlConnection
All Implemented Interfaces
com.smartdevicelink.protocol.ISdlProtocol, com.smartdevicelink.SdlConnection.ISdlConnectionListener, com.smartdevicelink.security.ISecurityInitializedListener
All Known Subclasses
com.smartdevicelink.SdlConnection.SdlSession2

Quick Jump

Fields
Constructors
Methods

Fields

sdlProtocol

protected final com.smartdevicelink.protocol.SdlProtocol sdlProtocol

transportConfig

protected com.smartdevicelink.transport.BaseTransportConfig transportConfig

sessionListener

protected com.smartdevicelink.SdlConnection.ISdlConnectionListener sessionListener

sdlSecurity

protected com.smartdevicelink.security.SdlSecurityBase sdlSecurity

desiredVideoParams

protected com.smartdevicelink.streaming.video.VideoStreamingParameters desiredVideoParams

acceptedVideoParams

protected com.smartdevicelink.streaming.video.VideoStreamingParameters acceptedVideoParams

sessionId

protected byte sessionId

sessionHashId

protected int sessionHashId

serviceListeners

protected java.util.HashMap serviceListeners

encryptedServices

protected java.util.concurrent.CopyOnWriteArrayList encryptedServices

Constructors

SdlSession( ISdlConnectionListener listener, BaseTransportConfig config )

public SdlSession(ISdlConnectionListener listener,BaseTransportConfig config)

Parameters

listener
config

Methods

getMtu()

public int getMtu()

getMtu( SessionType type )

public long getMtu(SessionType type)

Parameters

type

close()

public void close()

startService( SessionType serviceType, byte sessionID, boolean isEncrypted )

public void startService(SessionType serviceType,byte sessionID,boolean isEncrypted)

Parameters

serviceType
sessionID
isEncrypted

endService( SessionType serviceType, byte sessionID )

public void endService(SessionType serviceType,byte sessionID)

Parameters

serviceType
sessionID

startSession()

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

Throws

sendMessage( ProtocolMessage msg )

public void sendMessage(ProtocolMessage msg)

Parameters

msg

getCurrentTransportType()

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

getIsConnected()

public boolean getIsConnected()

shutdown( String info )

public void shutdown(String info)

Parameters

info

onTransportDisconnected( String info, boolean altTransportAvailable, BaseTransportConfig transportConfig )

public void onTransportDisconnected(String info,boolean altTransportAvailable,BaseTransportConfig transportConfig)

Parameters

info
altTransportAvailable
transportConfig

getProtocolVersion()

Get the current protocol version used by this session

public com.smartdevicelink.util.Version getProtocolVersion()

getTransportConfig()

public com.smartdevicelink.transport.BaseTransportConfig getTransportConfig()

getSessionHashId()

public int getSessionHashId()

getSessionId()

public byte getSessionId()

setSdlSecurity( SdlSecurityBase sec )

public void setSdlSecurity(SdlSecurityBase sec)

Parameters

sec

getSdlSecurity()

public com.smartdevicelink.security.SdlSecurityBase getSdlSecurity()

processControlService( ProtocolMessage msg )

protected void processControlService(ProtocolMessage msg)

Parameters

msg

isServiceProtected( SessionType sType )

public boolean isServiceProtected(SessionType sType)

Parameters

sType

onTransportDisconnected( String info )

public void onTransportDisconnected(String info)

Parameters

info

onTransportError( String info, Exception e )

public void onTransportError(String info,Exception e)

Parameters

info
e

onProtocolMessageReceived( ProtocolMessage msg )

public void onProtocolMessageReceived(ProtocolMessage msg)

Parameters

msg

onHeartbeatTimedOut( byte sessionID )

public void onHeartbeatTimedOut(byte sessionID)

Parameters

sessionID

onProtocolSessionStarted( SessionType sessionType, byte sessionID, byte version, String correlationID, int hashID, boolean isEncrypted )

public void onProtocolSessionStarted(SessionType sessionType,byte sessionID,byte version,String correlationID,int hashID,boolean isEncrypted)

Parameters

sessionType
sessionID
version
correlationID
hashID
isEncrypted

onProtocolSessionEnded( SessionType sessionType, byte sessionID, String correlationID )

public void onProtocolSessionEnded(SessionType sessionType,byte sessionID,String correlationID)

Parameters

sessionType
sessionID
correlationID

onProtocolError( String info, Exception e )

public void onProtocolError(String info,Exception e)

Parameters

info
e

onProtocolSessionEndedNACKed( SessionType sessionType, byte sessionID, String correlationID )

public void onProtocolSessionEndedNACKed(SessionType sessionType,byte sessionID,String correlationID)

Parameters

sessionType
sessionID
correlationID

onProtocolServiceDataACK( SessionType sessionType, int dataSize, byte sessionID )

public void onProtocolServiceDataACK(SessionType sessionType,int dataSize,byte sessionID)

Parameters

sessionType
dataSize
sessionID

onAuthTokenReceived( String token, byte sessionID )

public void onAuthTokenReceived(String token,byte sessionID)

Parameters

token
sessionID

addServiceListener( SessionType serviceType, ISdlServiceListener sdlServiceListener )

public void addServiceListener(SessionType serviceType,ISdlServiceListener sdlServiceListener)

Parameters

serviceType
sdlServiceListener

removeServiceListener( SessionType serviceType, ISdlServiceListener sdlServiceListener )

public boolean removeServiceListener(SessionType serviceType,ISdlServiceListener sdlServiceListener)

Parameters

serviceType
sdlServiceListener

getServiceListeners()

public java.util.HashMap getServiceListeners()

setDesiredVideoParams( VideoStreamingParameters params )

public void setDesiredVideoParams(VideoStreamingParameters params)

Parameters

params

getDesiredVideoParams()

Returns the currently set desired video streaming parameters. If there haven't been any set, the default options will be returned and set for this instance.

public com.smartdevicelink.streaming.video.VideoStreamingParameters getDesiredVideoParams()

setAcceptedVideoParams( VideoStreamingParameters params )

public void setAcceptedVideoParams(VideoStreamingParameters params)

Parameters

params

getAcceptedVideoParams()

public com.smartdevicelink.streaming.video.VideoStreamingParameters getAcceptedVideoParams()

onProtocolMessageBytesToSend( SdlPacket packet )

public void onProtocolMessageBytesToSend(SdlPacket packet)

Parameters

packet

onProtocolSessionStartedNACKed( SessionType sessionType, byte sessionID, byte version, String correlationID, java.util.List<java.lang.String> rejectedParams )

public void onProtocolSessionStartedNACKed(SessionType sessionType,byte sessionID,byte version,String correlationID,java.util.List<java.lang.String> rejectedParams)

Parameters

sessionType
sessionID
version
correlationID
rejectedParams

onProtocolSessionNACKed( SessionType sessionType, byte sessionID, byte version, String correlationID, java.util.List<java.lang.String> rejectedParams )

public void onProtocolSessionNACKed(SessionType sessionType,byte sessionID,byte version,String correlationID,java.util.List<java.lang.String> rejectedParams)

Parameters

sessionType
sessionID
version
correlationID
rejectedParams

onAuthTokenReceived( String authToken )

public void onAuthTokenReceived(String authToken)

Parameters

authToken

onProtocolHeartbeat( SessionType sessionType, byte sessionID )

public void onProtocolHeartbeat(SessionType sessionType,byte sessionID)

Parameters

sessionType
sessionID

onProtocolHeartbeatACK( SessionType sessionType, byte sessionID )

public void onProtocolHeartbeatACK(SessionType sessionType,byte sessionID)

Parameters

sessionType
sessionID

onResetOutgoingHeartbeat( SessionType sessionType, byte sessionID )

public void onResetOutgoingHeartbeat(SessionType sessionType,byte sessionID)

Parameters

sessionType
sessionID

onResetIncomingHeartbeat( SessionType sessionType, byte sessionID )

public void onResetIncomingHeartbeat(SessionType sessionType,byte sessionID)

Parameters

sessionType
sessionID

onSecurityInitialized()

public void onSecurityInitialized()

stopStream( SessionType serviceType )

public void stopStream(SessionType serviceType)

Parameters

serviceType

isTransportForServiceAvailable( SessionType sessionType )

Check to see if a transport is available to start/use the supplied service.

public boolean isTransportForServiceAvailable(SessionType sessionType)

Parameters

sessionType
the session that should be checked for transport availability

clearConnection()

Deprecated

public void clearConnection()

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