Search in sources :

Example 1 with ServerInfoService

use of org.apache.knox.gateway.services.ServerInfoService in project knox by apache.

the class VersionResource method getServerVersion.

/**
 * @return
 */
private ServerVersion getServerVersion() {
    GatewayServices services = (GatewayServices) request.getServletContext().getAttribute(GatewayServices.GATEWAY_SERVICES_ATTRIBUTE);
    ServerInfoService sis = services.getService(GatewayServices.SERVER_INFO_SERVICE);
    return new ServerVersion(sis.getBuildVersion(), sis.getBuildHash());
}
Also used : GatewayServices(org.apache.knox.gateway.services.GatewayServices) ServerInfoService(org.apache.knox.gateway.services.ServerInfoService)

Aggregations

GatewayServices (org.apache.knox.gateway.services.GatewayServices)1 ServerInfoService (org.apache.knox.gateway.services.ServerInfoService)1