xitrum
package xitrum
Things that are usually used by application developers are put in this package for convenience, because when they want to use XXX, they can simply write:
import xitrum.XXX
To avoid polluting this namespace, things that are utilities should be put in package xitrum.util, not here.
Annotations and validators are put to package xitrum.annation and xitrum.validator because there are many of them. It's better for application developers to write:
import xitrum.annotation._ import xitrum.validator._
- Alphabetic
- By Inheritance
- xitrum
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
Action
extends RequestEnv with SessionEnv with Log with Net with Filter with BasicAuth with Redirect with Url with Renderer with ViewRenderer with Responder with ViewResponder with FlashRenderer with FlashResponder with JsRenderer with JsResponder with I18n
When there's a request comes in, action extending Action will be run directly on the current Netty IO thread.
When there's a request comes in, action extending Action will be run directly on the current Netty IO thread. This gives maximum speed when the action is simple and nonblocking.
See also FutureAction and ActorAction.
-
trait
ActorAction
extends Actor with Action
An actor will be created when there's request.
An actor will be created when there's request. It will be stopped when: - The connection is closed - The response has been sent by respondText, respondView etc.
For chunked response, it is not stopped right away. It is stopped when the last chunk is sent.
See also Action and FutureAction.
- class BasicAuthConfig extends AnyRef
-
abstract
class
Cache
extends AnyRef
This is the interface for cache implementations of Xitrum.
This is the interface for cache implementations of Xitrum. All methods do not take callbacks, because cache should be fast. The point of using cache is to become faster. There's no point in using a slow cache.
- trait Component extends Action
-
trait
FutureAction
extends Action
Actions extending FutureAction will be run asynchronously in a future.
Actions extending FutureAction will be run asynchronously in a future. The execution context is xitrum.Config.actorSystem.dispatcher.
See also Action and ActorAction.
- class HttpsConfig extends AnyRef
- trait I18n extends AnyRef
-
trait
Log
extends AnyRef
If you don't care about the class name where the log is made, without having to extend this trait, you can call like this directly: xitrum.Log.debug("msg"), xitrum.Log.info("msg") etc.
- class MetricsConfig extends AnyRef
- abstract class OptVar [+A] extends AnyRef
- class PortConfig extends AnyRef
- class RequestConfig extends AnyRef
- class RequestVar [+A] extends OptVar[A]
- class ResponseConfig extends AnyRef
- class ReverseProxyConfig extends AnyRef
- class SessionConfig extends AnyRef
- class SessionVar [+A] extends OptVar[A]
-
trait
SkipCsrfCheck
extends AnyRef
By default all non-GET requests are checked for anti-CSRF token.
By default all non-GET requests are checked for anti-CSRF token. Make your controller (normally APIs for machines, e.g. smartphones) extend this trait if you want to skip the check. Subclasses of the controller will also not be checked.
-
trait
SockJsAction
extends Actor with Action
An actor will be created when there's new SockJS session.
An actor will be created when there's new SockJS session. It will be stopped when the session is closed.
- case class SockJsText (text: String) extends Product with Serializable
- class StaticFileConfig extends AnyRef
- class Version extends AnyRef
-
trait
WebSocketAction
extends Actor with Action
An actor will be created when there's request.
An actor will be created when there's request. It will be stopped when: - The connection is closed - WebSocket close frame is received or sent
- case class WebSocketBinary (bytes: Array[Byte]) extends Product with Serializable
- case class WebSocketText (text: String) extends Product with Serializable
-
class
XitrumConfig
extends AnyRef
This represents things in xitrum.conf.
-
class
js
extends FutureAction
To innclude xitrum.js in your view, use:
url[xitrum.js]
.
Value Members
-
lazy val
Log: Logger
This is a convenient helper to let you call like this directly: xitrum.Log.debug("msg"), xitrum.Log.info("msg") etc.
This is a convenient helper to let you call like this directly: xitrum.Log.debug("msg"), xitrum.Log.info("msg") etc.
If you do care about the class name where the log is made, use trait xitrum.Log.
- lazy val Metrics: MetricBuilder
-
lazy val
root: String
Path to the root directory of the current project.
Path to the root directory of the current project. If you're familiar with Rails, this is the same as Rails.root.
- lazy val version: Version
- object Action
- object Cache
-
object
Config
See config/xitrum.properties
-
object
DualConfig
Dual config means the config can be in either one of the 2 forms:
Dual config means the config can be in either one of the 2 forms:
config { key = a.b.c }
Or:
config { key { "a.b.c" { option1 = value1 option2 = value2 } } }
- object FlashSocketPolicyServer
- object Server
-
object
WebSocketPing
extends Product with Serializable
Pong is automatically sent by Xitrum, don't send it yourself.
- object WebSocketPong extends Product with Serializable