Class AbstractEmbeddedAspectran

    • Constructor Detail

      • AbstractEmbeddedAspectran

        public AbstractEmbeddedAspectran()
    • Method Detail

      • isExposable

        public boolean isExposable​(java.lang.String transletName)
        Description copied from interface: EmbeddedAspectran
        Returns whether or not the translet can be exposed to the daemon service.
        Specified by:
        isExposable in interface EmbeddedAspectran
        Overrides:
        isExposable in class AbstractCoreService
        Parameters:
        transletName - the name of the translet to check
        Returns:
        true if the translet can be exposed; false otherwise
      • initSessionManager

        protected void initSessionManager()
      • destroySessionManager

        protected void destroySessionManager()
      • getBean

        public <V> V getBean​(java.lang.String id)
        Description copied from interface: EmbeddedAspectran
        Return an instance of the bean that matches the given id.
        Specified by:
        getBean in interface EmbeddedAspectran
        Type Parameters:
        V - the result type of the bean
        Parameters:
        id - the id of the bean to retrieve
        Returns:
        an instance of the bean
      • getBean

        public <V> V getBean​(java.lang.Class<V> type)
        Description copied from interface: EmbeddedAspectran
        Return an instance of the bean that matches the given object type.
        Specified by:
        getBean in interface EmbeddedAspectran
        Type Parameters:
        V - the result type of the bean
        Parameters:
        type - the type the bean must match; can be an interface or superclass. null is disallowed.
        Returns:
        an instance of the bean
      • getBean

        public <V> V getBean​(java.lang.Class<V> type,
                             java.lang.String id)
        Description copied from interface: EmbeddedAspectran
        Return an instance of the bean that matches the given object type.
        Specified by:
        getBean in interface EmbeddedAspectran
        Type Parameters:
        V - the result type of the bean
        Parameters:
        type - type the bean must match; can be an interface or superclass. null is allowed.
        id - the id of the bean to retrieve
        Returns:
        an instance of the bean
      • containsBean

        public boolean containsBean​(java.lang.String id)
        Description copied from interface: EmbeddedAspectran
        Return whether a bean with the specified id is present.
        Specified by:
        containsBean in interface EmbeddedAspectran
        Parameters:
        id - the id of the bean to query
        Returns:
        whether a bean with the specified id is present
      • containsBean

        public boolean containsBean​(java.lang.Class<?> type)
        Description copied from interface: EmbeddedAspectran
        Return whether a bean with the specified object type is present.
        Specified by:
        containsBean in interface EmbeddedAspectran
        Parameters:
        type - the object type of the bean to query
        Returns:
        whether a bean with the specified type is present
      • containsBean

        public boolean containsBean​(java.lang.Class<?> type,
                                    java.lang.String id)
        Description copied from interface: EmbeddedAspectran
        Returns whether the bean corresponding to the specified object type and ID exists.
        Specified by:
        containsBean in interface EmbeddedAspectran
        Parameters:
        type - the object type of the bean to query
        id - the id of the bean to query
        Returns:
        whether a bean with the specified type is present
      • getMessage

        public java.lang.String getMessage​(java.lang.String code,
                                           java.lang.Object[] args,
                                           java.util.Locale locale)
                                    throws NoSuchMessageException
        Description copied from interface: EmbeddedAspectran
        Try to resolve the message. Treat as an error if the message can't be found.
        Specified by:
        getMessage in interface EmbeddedAspectran
        Parameters:
        code - the code to lookup up, such as 'calculator.noRateSet'
        args - Array of arguments that will be filled in for params within the message (params look like "{0}", "{1,date}", "{2,time}" within a message), or null if none.
        locale - the Locale in which to do the lookup
        Returns:
        the resolved message
        Throws:
        NoSuchMessageException - if the message wasn't found
        See Also:
        MessageFormat
      • getMessage

        public java.lang.String getMessage​(java.lang.String code,
                                           java.lang.Object[] args,
                                           java.lang.String defaultMessage,
                                           java.util.Locale locale)
        Description copied from interface: EmbeddedAspectran
        Try to resolve the message. Return default message if no message was found.
        Specified by:
        getMessage in interface EmbeddedAspectran
        Parameters:
        code - the code to lookup up, such as 'calculator.noRateSet'. Users of this class are encouraged to base message names on the relevant fully qualified class name, thus avoiding conflict and ensuring maximum clarity.
        args - array of arguments that will be filled in for params within the message (params look like "{0}", "{1,date}", "{2,time}" within a message), or null if none.
        defaultMessage - String to return if the lookup fails
        locale - the Locale in which to do the lookup
        Returns:
        the resolved message if the lookup was successful; otherwise the default message passed as a parameter
        See Also:
        MessageFormat