Class JmdnsService
java.lang.Object
com.exxothermic.audioeverywheresdk.helper.logic.JmdnsService
Class which uses the jmdns library to discover the exxothermic service
published through avahi by MyBox
- Since:
- 10/9/13
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Inner interface which defines the handler for a Jmdns handlerclass
Inner class which implements a service listener to the jmdns API -
Constructor Summary
ConstructorsConstructorDescriptionJmdnsService
(android.content.Context context, int scanningTimeoutInSeconds, boolean scanOverEthernet, AudioEverywhereResponseHandler responseHandler) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGetter for the service handlervoid
interruptScanning
(boolean isForTimeOut) boolean
void
Setter for the service handlervoid
setResponseHandler
(AudioEverywhereResponseHandler mResponseHandler) void
setScanningTimeOut
(int mScanningTimeOut) Method that will set the timeout for the scanning.void
Method which starts the servicevoid
stopDiscoveryService
(boolean isForTimeOut, boolean notifyToHandler) Method which stops the service
-
Constructor Details
-
JmdnsService
public JmdnsService(android.content.Context context, int scanningTimeoutInSeconds, boolean scanOverEthernet, AudioEverywhereResponseHandler responseHandler) Default constructor- Parameters:
context
- The application contextscanningTimeoutInSeconds
- the timeout that will be used for the scanner while trying to find exxtractorsscanOverEthernet
- set if we should use the ethernet port to scan over itresponseHandler
- The response handler that will be called based on the discovery status
-
-
Method Details
-
isServiceIsCleaning
public boolean isServiceIsCleaning() -
getHandler
Getter for the service handler- Returns:
- The service handler
-
setHandler
Setter for the service handler- Parameters:
handler
- The service handler
-
setScanningTimeOut
public void setScanningTimeOut(int mScanningTimeOut) Method that will set the timeout for the scanning. Note: the time is expressed in seconds- Parameters:
mScanningTimeOut
- the timeout for the scan. The scan process will be considered as failed when this time has passed, in seconds
-
setResponseHandler
-
startDiscoveryService
public void startDiscoveryService()Method which starts the service -
stopDiscoveryService
public void stopDiscoveryService(boolean isForTimeOut, boolean notifyToHandler) Method which stops the service- Parameters:
isForTimeOut
-
-
interruptScanning
public void interruptScanning(boolean isForTimeOut)
-