Class Gateway

  • Direct Known Subclasses:
    ServletGateway

    public class Gateway
    extends java.lang.Object
    Base implementation for integrating a gateway. A gateway translates the http delivery framework to otter and dispatches requests to resources. The http delivery framework objects must not go past this implementation into Otter's internals. Example extension is, ServletGateway.
    • Method Detail

      • locationTranslator

        public <S extends DefaultSession,​U extends DefaultUserLocationTranslator<S,​U> locationTranslator​(java.lang.String groupName)
        Finds the location translator for the groupName. Casting is safe here because the type of the value in locationTranslators are upper bound wild cards for, DefaultSession and DefaultUser. Therefore the values extend, DefaultSession and DefaultUser. https://docs.oracle.com/javase/tutorial/java/generics/subtyping.html
        Type Parameters:
        S - Session
        U - User
        Parameters:
        groupName - the name of the group. Used as a lookup key for the translator.
        Returns:
        the locationTranslator for the group
      • restLocationTranslator

        public <U extends DefaultUser,​P> RestLocationTranslator<U,​P> restLocationTranslator​(java.lang.String groupName)
        Finds the rest location translator for the groupName. Casting is safe here because the type of the value in locationTranslators are upper bound wild cards for, DefaultUser and Translatable. Therefore the values extend, DefaultUser and Translatable. https://docs.oracle.com/javase/tutorial/java/generics/subtyping.html
        Type Parameters:
        U - User
        P - Payload
        Parameters:
        groupName - the name of the group. Used as a lookup key for the translator.
        Returns:
        the restLocationTranslator for the group