org.keycloak.services.resources

## Class KeycloakApplication

- java.lang.Object
- - javax.ws.rs.core.Application
  - - org.keycloak.services.resources.KeycloakApplication

- Direct Known Subclasses:
    UpsSecurityApplication

      public class KeycloakApplication
      extends javax.ws.rs.core.Application

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<Class<?>>` | `classes`
    `protected String` | `contextPath`
    `protected KeycloakSessionFactory` | `sessionFactory`
    `protected Set<Object>` | `singletons`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeycloakApplication(javax.servlet.ServletContext context, org.jboss.resteasy.core.Dispatcher dispatcher)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static KeycloakSessionFactory` | `createSessionFactory()`
    `URI` | `getBaseUri(javax.ws.rs.core.UriInfo uriInfo)` Get base URI of WAR distribution, not JAX-RS
    `Set<Class<?>>` | `getClasses()`
    `String` | `getContextPath()`
    `KeycloakSessionFactory` | `getSessionFactory()`
    `Set<Object>` | `getSingletons()`
    `void` | `importRealm(RealmRepresentation rep, String from)`
    `void` | `importRealmFile()`
    `void` | `importRealmResources(javax.servlet.ServletContext context)`
    `void` | `importRealms(javax.servlet.ServletContext context)`
    `static void` | `loadConfig()`
    `protected void` | `setupDefaultRealm(String contextPath)`
    `static void` | `setupScheduledTasks(KeycloakSessionFactory sessionFactory)`

    - ### Methods inherited from class javax.ws.rs.core.Application

      `getProperties`

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

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

- - ### Field Detail

    - #### singletons

          protected Set<Object> singletons

    - #### classes

          protected Set<Class<?>> classes

    - #### sessionFactory

          protected KeycloakSessionFactory sessionFactory

    - #### contextPath

          protected String contextPath

  - ### Constructor Detail

    - #### KeycloakApplication

          public KeycloakApplication(@Context
                             javax.servlet.ServletContext context,
                             @Context
                             org.jboss.resteasy.core.Dispatcher dispatcher)

  - ### Method Detail

    - #### getContextPath

          public String getContextPath()

    - #### getBaseUri

          public URI getBaseUri(javax.ws.rs.core.UriInfo uriInfo)

      Get base URI of WAR distribution, not JAX-RS
      Parameters:
        `uriInfo` -
      Returns:

    - #### loadConfig

          public static void loadConfig()

    - #### setupDefaultRealm

          protected void setupDefaultRealm(String contextPath)

    - #### createSessionFactory

          public static KeycloakSessionFactory createSessionFactory()

    - #### setupScheduledTasks

          public static void setupScheduledTasks(KeycloakSessionFactory sessionFactory)

    - #### getSessionFactory

          public KeycloakSessionFactory getSessionFactory()

    - #### getClasses

          public Set<Class<?>> getClasses()

      Overrides:
        `getClasses` in class `javax.ws.rs.core.Application`

    - #### getSingletons

          public Set<Object> getSingletons()

      Overrides:
        `getSingletons` in class `javax.ws.rs.core.Application`

    - #### importRealms

          public void importRealms(javax.servlet.ServletContext context)

    - #### importRealmResources

          public void importRealmResources(javax.servlet.ServletContext context)

    - #### importRealmFile

          public void importRealmFile()

    - #### importRealm

          public void importRealm(RealmRepresentation rep,
                         String from)

Copyright © 2015. All Rights Reserved.