Interface Framework

  • All Known Implementing Classes:
    FrameworkBase, SpringFrameworkBase

    public interface Framework
    FrameWork may be used to access the serviceframework from the outside (eg servlet / spring bean) independent of OSGi framework implementation. FIXME: is the a servicecontainer or a frameworkconfig... maybe split it up?
    Author:
    bramk
    • Field Detail

      • CLUSTERING_READONLY_PROP

        static final String CLUSTERING_READONLY_PROP
        Java setting key used to configure an instance as master or slave.
        See Also:
        Constant Field Values
      • CLUSTERING_NODEID_PROP

        static final String CLUSTERING_NODEID_PROP
        Java setting key used to configure the cluster wide unique identifier for this instance.
        See Also:
        Constant Field Values
    • Method Detail

      • isStarting

        boolean isStarting()
        Check whether the framework is starting up.
        Returns:
        True if the OSGi impl is busy starting up.
      • isAvailable

        boolean isAvailable()
        Check whether the OSGi impl is running and available.
        Returns:
        True if the OSGi impl is up and running. If isStarting() is false and this returns false, then the framework is unavailable (error).
      • setBaseDirectory

        void setBaseDirectory​(String path)
                       throws ConfigurationException
        Set the applications basedirectorty. Public setter provided for DI.
        Parameters:
        path - absolute path to the basedirectory on the filesystem.
        Throws:
        ConfigurationException - when the directory is not accessible
      • getBaseDirectory

        String getBaseDirectory()
        Get the applications basedirectorty.
        Returns:
        absolute path of the basedirectory
      • getWorkDirectory

        String getWorkDirectory()
        Get the applications workdirectory
        Returns:
        absolute path of the workdirectory
      • setBundleDirectory

        void setBundleDirectory​(String path)
                         throws ConfigurationException
        Set the framework bundledirectorty. Public setter provided for DI.
        Parameters:
        path - absolute path to the bundledirectory on the filesystem.
        Throws:
        ConfigurationException - when the directory is not accessible
      • getEditionDirectory

        String getEditionDirectory()
        Get the framework edition bundle directory.
        Returns:
        absolute path of the edition bundle directory
      • setEditionDirectory

        void setEditionDirectory​(String path)
                          throws ConfigurationException
        Set the framework edition bundle directory. Public setter provided for DI.
        Parameters:
        path - absolute path to the edition bundle on the filesystem.
        Throws:
        ConfigurationException - when the directory is not accessible
      • getBundleDirectory

        String getBundleDirectory()
        Get the framework bundledirectorty.
        Returns:
        absolute path of the bundledirectory
      • setCacheDirectory

        void setCacheDirectory​(String path)
                        throws ConfigurationException
        Set the applications cachedirectorty. Public setter provided for DI.
        Parameters:
        path - absolute path to the cachedirectory on the filesystem.
        Throws:
        ConfigurationException - when the directory is not accessible
      • getCacheDirectory

        String getCacheDirectory()
        Get the framework cachedirectorty.
        Returns:
        absolute path of the cachedirectorty
      • setRepositoryDirectory

        void setRepositoryDirectory​(String path)
                             throws ConfigurationException
        Set the applications JCR repositorydirectorty. Public setter provided for DI.
        Parameters:
        path - absolute path to the repositorydirectorty on the filesystem.
        Throws:
        ConfigurationException - when the directory is not accessible
      • getWebrootDirectory

        String getWebrootDirectory()
        Get the webrootdirectory.
        Returns:
        absolute path of the webrootdirectory
      • setWebrootDirectory

        void setWebrootDirectory​(String path)
                          throws ConfigurationException
        Set the applications webrootdirectory. Public setter provided for DI.
        Parameters:
        path - absolute path to the webrootdirectory on the filesystem.
        Throws:
        ConfigurationException - when the directory is not accessible
      • getRepositoryDirectory

        String getRepositoryDirectory()
        Get the JCR repositorydirectorty.
        Returns:
        absolute path of the repositorydirectorty
      • setProperties

        void setProperties​(Properties properties)
        Public setter provided for DI.
        Parameters:
        properties - startupproperties provided for the concrete framework implementation.
      • setInstallMap

        void setInstallMap​(Map<Integer,​List<String>> installMap)
        Public setter provided for DI.
        Parameters:
        installMap - map containing bundlenames to be installed for any startlevel.
      • getService

        Object getService​(String name)
                   throws FrameworkException
        Provide an easy access to services based on service name.
        Parameters:
        name - fully qualified name of the requested service interface.
        Returns:
        an instance of the service (if available)
        Throws:
        Exception - when something went wrong
        FrameworkException
      • getService

        Object getService​(String name,
                          String filter)
                   throws FrameworkException
        Provides easy access to services based on service name and optional filter.
        Parameters:
        name - fully qualified name of the requested service interface
        filter - LDAP filter for serviceregistration
        Returns:
        an instance of the service (if available)
        Throws:
        Exception - when something went wrong
        FrameworkException
      • getServices

        Object[] getServices​(String name)
                      throws FrameworkException
        Provide an easy access to services based on service name.
        Parameters:
        name - fully qualified name of the requested service interface.
        Returns:
        available service instances
        Throws:
        Exception - when something went wrong
        FrameworkException
      • getServices

        Object[] getServices​(String name,
                             String filter)
                      throws FrameworkException
        Provides easy access to services based on service name and optional filter.
        Parameters:
        name - fully qualified name of the requested service interface
        filter - LDAP filter for serviceregistration
        Returns:
        available service instances
        Throws:
        Exception - when something went wrong
        FrameworkException
      • setFrameworkStartLevel

        void setFrameworkStartLevel​(int startLevel,
                                    boolean blocking)
        Changes the active start level of the OSGi framework.
        Parameters:
        startLevel - the start level to set the framwork start level to.
        blocking - if true, wait for the framework to reach the new startlevel.
      • isClusterMasterNode

        boolean isClusterMasterNode()
        Indicates if this instance is a master node.
        Returns:
        true if this is a master node, else false.
      • getClusterNodeId

        String getClusterNodeId()
        Provides the configured cluster identifier for this node.
        Returns:
        the string identifier for this node.