Interface ServerContext


  • public interface ServerContext
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isWrapperFor​(java.lang.Class<?> iface)
      Returns true if this server context is a wrapper for the provided application specific context interface argument or returns false otherwise.
      <T> T unwrap​(java.lang.Class<T> iface)
      Returns an object that implements the given interface to allow access to application specific contexts.
    • Method Detail

      • unwrap

        <T> T unwrap​(java.lang.Class<T> iface)
        Returns an object that implements the given interface to allow access to application specific contexts.
        Parameters:
        iface - A Class defining an interface that the result must implement
        Returns:
        an object that implements the interface
        Throws:
        java.lang.RuntimeException - If the context cannot be unwrapped to the provided class
      • isWrapperFor

        boolean isWrapperFor​(java.lang.Class<?> iface)
        Returns true if this server context is a wrapper for the provided application specific context interface argument or returns false otherwise.
        Parameters:
        iface - a Class defining the underlying context
        Returns:
        true if this implements the interface can be unwrapped to the provided class
        Throws:
        java.lang.RuntimeException - if an error occurs while determining whether the provided class can be unwrapped from this context.