Class

org.scaloid.common

LocalServiceConnection

Related Doc: package common

Permalink

class LocalServiceConnection[S <: LocalService] extends ServiceConnection

An in-process service connector that can bound LocalService. This yields far more concise code than that uses plain-old Android API.

Please refer to the URL below for more details.

http://blog.scaloid.org/2013/03/introducing-localservice.html

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LocalServiceConnection
  2. ServiceConnection
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LocalServiceConnection(bindFlag: Int = Context.BIND_AUTO_CREATE)(implicit ctx: Context, reg: Registerable, mf: ClassTag[S])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[T](test: (S) ⇒ Boolean, ifTrue: (S) ⇒ T, ifFalse: ⇒ T): T

    Permalink

    for example: val service = new LocalServiceConnection[MyService] //...

    for example: val service = new LocalServiceConnection[MyService] //... val result = service(_.foo > 3, "3 < " + _.foo, "fail")

  5. def apply[T](f: (S) ⇒ T, ifEmpty: ⇒ T): T

    Permalink

    Execute given function with the connected service.

    Execute given function with the connected service. If the service is not connected yet, this returns ifEmpty value for example: val service = new LocalServiceConnection[MyService] //... val foo = service(_.foo, defaultVal)

  6. def apply[T](f: (S) ⇒ Unit): Unit

    Permalink

    Execute given function with the connected service.

    Execute given function with the connected service. If the service is not connected yet, the function is enqueued and be called when the service is connected. For example: val service = new LocalServiceConnection[MyService] //... service(_.doSomeJob())

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. var binder: IBinder

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. var componentName: ComponentName

    Permalink
  11. def connected: Boolean

    Permalink

    Returns true if the service is currently connected.

  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def ifAvailable[T](f: (S) ⇒ T): Unit

    Permalink

    Execute given function with the connected service.

    Execute given function with the connected service. If the service is not connected yet, this does nothing for example: val service = new LocalServiceConnection[MyService] //... val foo = service.ifAvailable(_.foo)

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. var onConnected: EventSource1[S, Unit]

    Permalink
  23. var onDisconnected: EventSource1[S, Unit]

    Permalink
  24. def onServiceConnected(p1: ComponentName, b: IBinder): Unit

    Permalink

    Internal implementation for handling the service connection.

    Internal implementation for handling the service connection. You do not need to call this method.

    Definition Classes
    LocalServiceConnection → ServiceConnection
  25. def onServiceDisconnected(p1: ComponentName): Unit

    Permalink

    Internal implementation for handling the service connection.

    Internal implementation for handling the service connection. You do not need to call this method.

    Definition Classes
    LocalServiceConnection → ServiceConnection
  26. var service: Option[S]

    Permalink
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ServiceConnection

Inherited from AnyRef

Inherited from Any

Ungrouped