org.mashupbots.socko

infrastructure

package infrastructure

Utility classes and objects

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. infrastructure
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class LocalCache extends AnyRef

    Local in-memory cache based on Google's ConcurrentLinkedHashMap.

  2. trait Logger extends AnyRef

    Adds logging functionality to our classes.

    Adds logging functionality to our classes.

    We try not to use this logger too often because it is synchronous. Most of Socko's logging is performed inside Akka because it is asynchronous.

    Usage:

    log.debug("Hello")
    log.error("Message: {} {}", Array[AnyRef]("value1", "value2"))
  3. case class WebLogEvent(timestamp: Date, serverName: String, channelContextName: String, clientAddress: SocketAddress, serverAddress: SocketAddress, username: Option[String], method: String, uri: String, requestSize: Long, responseStatusCode: Int, responseSize: Long, timeTaken: Long, protocolVersion: String, userAgent: Option[String], referrer: Option[String]) extends Product with Serializable

    A web log event to record

    A web log event to record

    timestamp

    Timestamp for the event

    serverName

    Socko Web Server instance name

    clientAddress

    Client's socket address. We don't convert to string here in case JDK performs a blocknig reverse DNS lookup.

    serverAddress

    Server's socket address. We don't convert to string here in case JDK performs a blocknig reverse DNS lookup.

    username

    Authenticated user name

    method

    The action the client was trying to perform (for example, a GET method).

    uri

    The resource accessed; for example, Default.htm.

    requestSize

    The number of bytes received by the server.

    responseStatusCode

    The status of the action, in HTTP or FTP terms.

    responseSize

    The number of bytes sent by the server.

    timeTaken

    The duration of time, in milliseconds, that this action consumed.

    protocolVersion

    The protocol (HTTP, FTP) version used by the client. For HTTP this will be either HTTP/1.0 or HTTP/1.1.

    userAgent

    The browser used on the client.

    referrer

    The previous site visited by the user. This site provided a link to the current site.

  4. class WebLogWriter extends Actor

    Default log writer that writes web log events to the AKKA logger.

    Default log writer that writes web log events to the AKKA logger.

    AKKA logger is used because it asynchronously writes to the log in a separate thread so it does not slow down your app.

Value Members

  1. object CharsetUtil

    A utility class that provides various constants related with character sets.

    A utility class that provides various constants related with character sets.

    This is a copy of the Netty CharsetUtil and is provided so that projects don't have to reference Netty directly.

  2. object ConfigUtil

    A utility class for reading AKKA configuration

  3. object DateUtil

    Utility methods associated with dates

  4. object HashUtil

  5. object IOUtil

    Utility IO methods

  6. object MimeTypes

    MIME types lookup

    MIME types lookup

    This implementation uses `MimetypesFileTypeMap` and relies on the presence of the file extension in a mime.types file.

    See

    • https://github.com/klacke/yaws/blob/master/src/mime.types
    • http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
    • http://download.oracle.com/javaee/5/api/javax/activation/MimetypesFileTypeMap.html
    • src/main/resources/META-INF/mime.types
  7. object ReflectUtil extends Logger

    Reflection utility functions

  8. object WebLogEvent extends Serializable

  9. object WebLogFormat extends Enumeration

    Web Server Activity Log setting

Inherited from AnyRef

Inherited from Any

Ungrouped