Package org.jvnet.hk2.config

Examples of org.jvnet.hk2.config.ConfigCode


                DomainInitializer.class)) {
            logger.info(strings.get("InvokeInitializer",
                    inhabitant.getClass()));
            Container newContainerConfig = inhabitant.getInitialConfig(ctx);
            try {
                ConfigSupport.apply((new ConfigCode() {
                    @Override
                    @SuppressWarnings("unchecked")
                    public Object run(ConfigBeanProxy... objects) throws PropertyVetoException, TransactionFailure {
                        ((Config) objects[0]).getContainers().add((Container) objects[1]);
                        return Boolean.TRUE;
View Full Code Here


            final Protocols protocols = config.getNetworkConfig().getProtocols();
            final Protocol protocol = protocols.findProtocol(protocolName);
            validate(protocol, "create.http.fail.protocolnotfound",
                "The specified protocol {0} is not yet configured", protocolName);
            PortUnification pu = getPortUnification(protocol);
            ConfigSupport.apply(new ConfigCode() {
                @Override
                public Object run(ConfigBeanProxy... params) {
                    final Protocol prot = (Protocol) params[0];
                    final PortUnification portUnification = (PortUnification) params[1];
View Full Code Here

                "Protocol {0} has neither a protocol nor a port-unification configured", protocol));
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return;
        }
        try {
            ConfigSupport.apply(new ConfigCode() {
                public Object run(ConfigBeanProxy... params) throws TransactionFailure, PropertyVetoException {
                    NetworkListeners listeners = (NetworkListeners) params[0];
                    NetworkListener newNetworkListener = listeners.createChild(NetworkListener.class);
                    newNetworkListener.setProtocol(protocol);
                    newNetworkListener.setTransport(transport);
View Full Code Here

            if (findListener(networkListeners, report)) {
                final Protocol httpProtocol = listenerToBeRemoved.findHttpProtocol();
                final VirtualServer virtualServer = config.getHttpService().getVirtualServerByName(
                        httpProtocol.getHttp().getDefaultVirtualServer());

                ConfigSupport.apply(new ConfigCode() {
                    public Object run(ConfigBeanProxy... params) throws PropertyVetoException {
                        final NetworkListeners listeners = (NetworkListeners) params[0];
                        final VirtualServer server = (VirtualServer) params[1];
                        listeners.getNetworkListener().remove(listenerToBeRemoved);
                        server.removeNetworkListener(listenerToBeRemoved.getName());
View Full Code Here

                DomainInitializer.class)) {
            logger.info(strings.get("InvokeInitializer",
                    inhabitant.getClass()));
            Container newContainerConfig = inhabitant.getInitialConfig(ctx);
            try {
                ConfigSupport.apply((new ConfigCode() {
                    @Override
                    @SuppressWarnings("unchecked")
                    public Object run(ConfigBeanProxy... objects) throws PropertyVetoException, TransactionFailure {
                        ((Config) objects[0]).getContainers().add((Container) objects[1]);
                        return Boolean.TRUE;
View Full Code Here

                DomainInitializer.class)) {
            logger.info(strings.get("InvokeInitializer",
                    inhabitant.getClass()));
            Container newContainerConfig = inhabitant.getInitialConfig(ctx);
            try {
                ConfigSupport.apply((new ConfigCode() {
                    @Override
                    @SuppressWarnings("unchecked")
                    public Object run(ConfigBeanProxy... objects) throws PropertyVetoException, TransactionFailure {
                        ((Config) objects[0]).getContainers().add((Container) objects[1]);
                        return Boolean.TRUE;
View Full Code Here

        try {
            final Protocols protocols = config.getNetworkConfig().getProtocols();
            final Protocol protocol = protocols.findProtocol(protocolName);
            validate(protocol, CreateHttp.CREATE_HTTP_FAIL_PROTOCOL_NOT_FOUND, protocolName);
            PortUnification pu = getPortUnification(protocol);
            ConfigSupport.apply(new ConfigCode() {
                @Override
                public Object run(ConfigBeanProxy... params) {
                    final Protocol prot = (Protocol) params[0];
                    final PortUnification portUnification = (PortUnification) params[1];
View Full Code Here

        }

        BackendPrincipal backendPrincipal = map.getBackendPrincipal();

        try {
            ConfigSupport.apply(new ConfigCode() {

                public Object run(ConfigBeanProxy... params) throws PropertyVetoException, TransactionFailure {
                    SecurityMap sm = (SecurityMap) params[0];
                    BackendPrincipal bp = (BackendPrincipal) params[1];
                    //setting the updated principal user-group arrays....
View Full Code Here

            if (findListener(networkListeners, report)) {
                final Protocol httpProtocol = listenerToBeRemoved.findHttpProtocol();
                final VirtualServer virtualServer = config.getHttpService().getVirtualServerByName(
                        httpProtocol.getHttp().getDefaultVirtualServer());

                ConfigSupport.apply(new ConfigCode() {
                    public Object run(ConfigBeanProxy... params) throws PropertyVetoException {
                        final NetworkListeners listeners = (NetworkListeners) params[0];
                        final VirtualServer server = (VirtualServer) params[1];
                        listeners.getNetworkListener().remove(listenerToBeRemoved);
                        server.removeNetworkListener(listenerToBeRemoved.getName());
View Full Code Here

                DomainInitializer.class)) {
            logger.info(strings.get("InvokeInitializer",
                    inhabitant.getClass()));
            Container newContainerConfig = inhabitant.getInitialConfig(ctx);
            try {
                ConfigSupport.apply((new ConfigCode() {
                    @Override
                    @SuppressWarnings("unchecked")
                    public Object run(ConfigBeanProxy... objects) throws PropertyVetoException, TransactionFailure {
                        ((Config) objects[0]).getContainers().add((Container) objects[1]);
                        return Boolean.TRUE;
View Full Code Here

TOP

Related Classes of org.jvnet.hk2.config.ConfigCode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.