Class BusForwarder

java.lang.Object
com.codingchili.core.listener.BusRouter
com.codingchili.core.listener.BusForwarder
All Implemented Interfaces:
CoreDeployment, CoreHandler, Receiver<Request>

public class BusForwarder extends BusRouter
A bus routerhandler with a static delivery address.
  • Constructor Details

    • BusForwarder

      public BusForwarder(String address)
  • Method Details

    • init

      public void init(CoreContext context)
      Description copied from interface: CoreDeployment
      Init method that is called with the context that the service was deployed from.
      Specified by:
      init in interface CoreDeployment
      Overrides:
      init in class BusRouter
      Parameters:
      context - the core context to use.
    • handle

      public void handle(Request request)
      Description copied from interface: Receiver
      Handles an incoming request without exception handling.
      Specified by:
      handle in interface Receiver<Request>
      Overrides:
      handle in class BusRouter
      Parameters:
      request - the request to be handled.
    • address

      public String address()
      Returns:
      the address of the handler. If not implemented the @Address annotation will be used, if missing an error is thrown.

      Could potentially lead to Runtime errors but is allowed here as this is called during deployment. Reconsider this decision later.