All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.fintrospect.ServerRoutes.scala Maven / Gradle / Ivy

package io.fintrospect

/**
 * Implement this trait if there is a requirement to have more than one route in a single class.
 */
trait ServerRoutes[RQ, RS] extends Iterable[ServerRoute[RQ, RS]] {
  private val definedRoutes = scala.collection.mutable.MutableList[ServerRoute[RQ, RS]]()

  protected def add(route: ServerRoute[RQ, RS]) = definedRoutes += route

  override def iterator: Iterator[ServerRoute[RQ, RS]] = definedRoutes.iterator
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy