public class SdlSession extends BaseSdlSession
acceptedVideoParams, desiredVideoParams, encryptedServices, sdlProtocol, sdlSecurity, serviceListeners, sessionId, sessionListener, transportConfig| Constructor and Description |
|---|
SdlSession(ISdlSessionListener listener,
MultiplexTransportConfig config) |
SdlSession(ISdlSessionListener listener,
TCPTransportConfig config) |
| Modifier and Type | Method and Description |
|---|---|
TransportType |
getCurrentTransportType() |
Version |
getProtocolVersion()
Get the current protocol version used by this session
|
protected SdlProtocolBase |
getSdlProtocolImplementation() |
void |
onAuthTokenReceived(String authToken)
A callback to indicate the SDL connected device has supplied an authentication token to this
application.
|
void |
onServiceEnded(SdlPacket packet,
SessionType serviceType,
int sessionID)
This will get called when a service has ended
|
void |
onServiceError(SdlPacket packet,
SessionType serviceType,
int sessionID,
String error)
If there is an error with starting or stopping the service or any other error this method
will be called.
|
void |
onServiceStarted(SdlPacket packet,
SessionType serviceType,
int sessionID,
Version version,
boolean isEncrypted)
Called to indicate that a service has been started
|
void |
shutdown(String info)
A request made by the protocol layer to shutdown the layers above it.
|
void |
startSession() |
addServiceListener, close, endService, extractSystemInfo, getAcceptedVideoParams, getActiveTransports, getDesiredVideoParams, getIsConnected, getMtu, getMtu, getSdlSecurity, getServiceListeners, getSessionId, getTransportConfig, isServiceProtected, isTransportForServiceAvailable, onProtocolError, onProtocolMessageReceived, onSecurityInitialized, onTransportDisconnected, processControlService, removeServiceListener, sendMessage, setAcceptedVideoParams, setDesiredVideoParams, setSdlSecurity, startServicepublic SdlSession(ISdlSessionListener listener, MultiplexTransportConfig config)
public SdlSession(ISdlSessionListener listener, TCPTransportConfig config)
protected SdlProtocolBase getSdlProtocolImplementation()
getSdlProtocolImplementation in class BaseSdlSessionpublic void startSession()
throws SdlException
startSession in class BaseSdlSessionSdlExceptionpublic TransportType getCurrentTransportType()
getCurrentTransportType in class BaseSdlSessionpublic void shutdown(String info)
ISdlProtocolshutdown in interface ISdlProtocolshutdown in class BaseSdlSessioninfo - human readable string on why the shutdown should occurpublic Version getProtocolVersion()
getProtocolVersion in class BaseSdlSessionpublic void onServiceStarted(SdlPacket packet, SessionType serviceType, int sessionID, Version version, boolean isEncrypted)
ISdlProtocolonServiceStarted in interface ISdlProtocolonServiceStarted in class BaseSdlSessionpacket - the control packet StartServiceACK received from the connected deviceserviceType - the service type that has been startedsessionID - the session ID that this service has been started onversion - the protocol version used for this session and serviceisEncrypted - if the service is encryptedpublic void onServiceEnded(SdlPacket packet, SessionType serviceType, int sessionID)
ISdlProtocolonServiceEnded in interface ISdlProtocolonServiceEnded in class BaseSdlSessionpacket - the packet received that ended this serviceserviceType - the service type that has endedsessionID - the id of the session that this service was operating onpublic void onServiceError(SdlPacket packet, SessionType serviceType, int sessionID, String error)
ISdlProtocolonServiceError in interface ISdlProtocolonServiceError in class BaseSdlSessionpacket - if there is a packet that caused this error it will be included, however this
can be null.serviceType - the service type that experienced the errorsessionID - the session ID that this service was associated witherror - a human readable string of the errorpublic void onAuthTokenReceived(String authToken)
ISdlProtocolonAuthTokenReceived in interface ISdlProtocolonAuthTokenReceived in class BaseSdlSession