Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
Documentation
BaseSdlSession

Class BaseSdlSession

Hierarchy

java.lang.Object

Package
com.smartdevicelink.session
All Implemented Interfaces
com.smartdevicelink.protocol.ISdlProtocol, com.smartdevicelink.security.ISecurityInitializedListener

Quick Jump

Fields
Constructors
Methods

Fields

sdlProtocol

protected final com.smartdevicelink.protocol.SdlProtocolBase sdlProtocol

transportConfig

protected final com.smartdevicelink.transport.BaseTransportConfig transportConfig

sessionListener

protected com.smartdevicelink.session.ISdlSessionListener sessionListener

sdlSecurity

protected SdlSecurityBase sdlSecurity

desiredVideoParams

protected com.smartdevicelink.streaming.video.VideoStreamingParameters desiredVideoParams

acceptedVideoParams

protected com.smartdevicelink.streaming.video.VideoStreamingParameters acceptedVideoParams

sessionId

protected int sessionId

serviceListeners

protected java.util.HashMap serviceListeners

encryptedServices

protected final java.util.concurrent.CopyOnWriteArrayList encryptedServices

Constructors

BaseSdlSession( ISdlSessionListener listener, BaseTransportConfig config )

public BaseSdlSession(ISdlSessionListener listener,BaseTransportConfig config)

Parameters

listener
config

Methods

getSdlProtocolImplementation()

protected abstract com.smartdevicelink.protocol.SdlProtocolBase getSdlProtocolImplementation()

getMtu()

public int getMtu()

getMtu( SessionType type )

public long getMtu(SessionType type)

Parameters

type

close()

public void close()

startService( SessionType serviceType, boolean isEncrypted )

public void startService(SessionType serviceType,boolean isEncrypted)

Parameters

serviceType
isEncrypted

endService( SessionType serviceType )

public void endService(SessionType serviceType)

Parameters

serviceType

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()

getProtocolVersion()

Get the current protocol version used by this session

public com.smartdevicelink.util.Version getProtocolVersion()

getTransportConfig()

public com.smartdevicelink.transport.BaseTransportConfig getTransportConfig()

setSdlSecurity( SdlSecurityBase sec )

public void setSdlSecurity(SdlSecurityBase sec)

Parameters

sec

processControlService( ProtocolMessage msg )

protected void processControlService(ProtocolMessage msg)

Parameters

msg

isServiceProtected( SessionType sType )

public boolean isServiceProtected(SessionType sType)

Parameters

sType

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

getAcceptedVideoParams()

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

onProtocolMessageReceived( ProtocolMessage msg )

public void onProtocolMessageReceived(ProtocolMessage msg)

Parameters

msg

onServiceStarted( SdlPacket packet, SessionType sessionType, int sessionID, Version version, boolean isEncrypted )

public abstract void onServiceStarted(SdlPacket packet,SessionType sessionType,int sessionID,Version version,boolean isEncrypted)

Parameters

packet
sessionType
sessionID
version
isEncrypted

onServiceEnded( SdlPacket packet, SessionType sessionType, int sessionID )

public abstract void onServiceEnded(SdlPacket packet,SessionType sessionType,int sessionID)

Parameters

packet
sessionType
sessionID

onServiceError( SdlPacket packet, SessionType sessionType, int sessionID, String error )

public abstract void onServiceError(SdlPacket packet,SessionType sessionType,int sessionID,String error)

Parameters

packet
sessionType
sessionID
error

onProtocolError( String info, Exception e )

public void onProtocolError(String info,Exception e)

Parameters

info
e

getSessionId()

public int getSessionId()

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

getSdlSecurity()

public SdlSecurityBase getSdlSecurity()

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

onAuthTokenReceived( String authToken )

public void onAuthTokenReceived(String authToken)

Parameters

authToken

onSecurityInitialized()

public void onSecurityInitialized()

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

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