org.hyperscala.web.service

Service

trait Service extends WebResource with RequestHandler

Service allows methods to be created in implementations that act as endpoints.

For example, if the Service uri is "/user" and you provide a method "create(name: String, phone: String)" then when the uri "/user/create" is invoked with JSON referencing "name" and "phone" the method will be invoked and the return will be converted to JSON as well.

Linear Supertypes
RequestHandler, Logging, LoggingCore, WebResource, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Service
  2. RequestHandler
  3. Logging
  4. LoggingCore
  5. WebResource
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def uri: String

    The base URI used to build the endpoint URIs

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(webapp: NettyWebapp, context: ChannelHandlerContext, event: MessageEvent): Unit

    Definition Classes
    Service → RequestHandler
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def asynchronousLogging: Boolean

    Attributes
    protected
    Definition Classes
    LoggingCore
  9. def cacheTimeInSeconds: Int

    Definition Classes
    RequestHandler
  10. def callEndpoint(uri: String, request: String): String

    Calls the endpoint defined by the supplied uri.

    Calls the endpoint defined by the supplied uri. Service.uri is removed from the beginning leaving the method name to be invoked on this service. The request is received as a JSON String that is extracted to call the method with arguments by name.

    uri

    the complete uri

    request

    the JSON data as a String

    returns

    the JSON response as a String

  11. def chunkSize: Int

    Definition Classes
    RequestHandler
  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def debug(message: ⇒ Any): Unit

    Definition Classes
    Logging
  14. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  16. def error(message: ⇒ Any, t: Throwable): Unit

    Definition Classes
    Logging
  17. def error(message: ⇒ Any): Unit

    Definition Classes
    Logging
  18. def errorThrown(t: Throwable): Unit

    Definition Classes
    RequestHandler
  19. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  21. def hasEndpoint(uri: String): Boolean

  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. def info(message: ⇒ Any): Unit

    Definition Classes
    Logging
  24. def init(): Unit

    Init is called either the first

  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. def log(level: Level, message: ⇒ Any): Unit

    Definition Classes
    LoggingCore
  27. val logger: InnerLogging

    Definition Classes
    LoggingCore
  28. def loggingClassName: String

    Attributes
    protected
    Definition Classes
    LoggingCore
  29. def mimeTypes: MimetypesFileTypeMap

    Definition Classes
    RequestHandler
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def priority: Priority

    Definition Classes
    WebResource
  34. final def register(website: Website[_]): Unit

    Registers this service and all its endpoints with the provided Website.

    Registers this service and all its endpoints with the provided Website.

    website

    the website to register with

  35. def request(webapp: NettyWebapp, context: ChannelHandlerContext, event: MessageEvent): Option[RequestHandler]

    Definition Classes
    Service → WebResource
  36. def streamFile(file: File, context: ChannelHandlerContext, request: HttpRequest, contentType: String, cacheTimeInSeconds: Int, chunkSize: Int, enableCaching: Boolean): Any

    Definition Classes
    RequestHandler
  37. def streamInput(input: InputStream, context: ChannelHandlerContext, request: HttpRequest, contentType: String, contentLength: Long, lastModified: Long, cacheTimeInSeconds: Int, chunkSize: Int, enableCaching: Boolean): Any

    Definition Classes
    RequestHandler
  38. def streamString(s: String, context: ChannelHandlerContext, request: HttpRequest, contentType: String, lastModified: Long, cacheTimeInSeconds: Int, enableCaching: Boolean): Unit

    Definition Classes
    RequestHandler
  39. def streamURL(url: URL, context: ChannelHandlerContext, request: HttpRequest, contentType: String, cacheTimeInSeconds: Int, chunkSize: Int, enableCaching: Boolean): Any

    Definition Classes
    RequestHandler
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  41. def toString(): String

    Definition Classes
    AnyRef → Any
  42. def trace(message: ⇒ Any): Unit

    Definition Classes
    Logging
  43. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def warn(message: ⇒ Any, t: Throwable): Unit

    Definition Classes
    Logging
  47. def warn(message: ⇒ Any): Unit

    Definition Classes
    Logging

Inherited from RequestHandler

Inherited from Logging

Inherited from LoggingCore

Inherited from WebResource

Inherited from AnyRef

Inherited from Any

Ungrouped