org.wildfly.swarm.topology.webapp

## Class TopologyWebAppFraction

- java.lang.Object
- - org.wildfly.swarm.topology.webapp.TopologyWebAppFraction

- All Implemented Interfaces:
    Fraction<TopologyWebAppFraction>

      public class TopologyWebAppFraction
      extends Object
      implements Fraction<TopologyWebAppFraction>

  Author:
    Lance Ball

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_CONTEXT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TopologyWebAppFraction()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `exposeTopologyEndpoint()`
    `void` | `exposeTopologyEndpoint(boolean exposeTopologyEndpoint)` Set to true to expose a Topology SSE endpoint and topology.js for consuming topology information from the browser.
    `Map<String,String>` | `proxiedServiceMappings()` Get a map, keyed by service name, of the proxied service names and their context paths.
    `static String` | `proxyHandlerName(String serviceName)`
    `void` | `proxyService(String serviceName, String contextPath)` Set up a load-balancing reverse proxy for the given service at the given context path.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.wildfly.swarm.spi.api.Fraction

      `applyDefaults, applyDefaults`

- - ### Field Detail

    - #### DEFAULT_CONTEXT

          public static final String DEFAULT_CONTEXT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TopologyWebAppFraction

          public TopologyWebAppFraction()

  - ### Method Detail

    - #### proxyHandlerName

          public static String proxyHandlerName(String serviceName)

      Parameters:
        `serviceName` -
      Returns:
        the name of the Undertow proxy handler for this service

    - #### proxyService

          public void proxyService(String serviceName,
                                   String contextPath)

      Set up a load-balancing reverse proxy for the given service at the given context path. Requests to this proxy will be load-balanced among all instances of the service, as provided by our Topology.
      Parameters:
        `serviceName` - the name of the service to proxy
        `contextPath` - the context path expose the proxy under

    - #### proxiedServiceMappings

          public Map<String,String> proxiedServiceMappings()

      Get a map, keyed by service name, of the proxied service names and their context paths.
      Returns:
        the map of proxied services and their context paths

    - #### exposeTopologyEndpoint

          public void exposeTopologyEndpoint(boolean exposeTopologyEndpoint)

      Set to true to expose a Topology SSE endpoint and topology.js for consuming topology information from the browser. Set to false to disable this endpoint. Defaults to true.
      Parameters:
        `exposeTopologyEndpoint` - whether to expose the endpoint or not

    - #### exposeTopologyEndpoint

          public boolean exposeTopologyEndpoint()

Copyright © 2017 JBoss by Red Hat. All rights reserved.