Examples of IoSessionFinder


Examples of org.apache.mina.integration.ognl.IoSessionFinder

    }

    @Override
    protected Object invoke0(String name, Object[] params, String[] signature) throws Exception {
        if (name.equals("findSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            return finder.find(getSource().getManagedSessions().values());
        }

        if (name.equals("findAndRegisterSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            Set<IoSession> registeredSessions = new LinkedHashSet<IoSession>();
            for (IoSession s: finder.find(getSource().getManagedSessions().values())) {
                try {
                    getServer().registerMBean(
                            new IoSessionMBean(s),
                            new ObjectName(
                                    getName().getDomain() +
                                    ":type=session,name=" +
                                    getSessionIdAsString(s.getId())));
                    registeredSessions.add(s);
                } catch (Exception e) {
                    logger.warn("Failed to register a session as a MBean: " + s, e);
                }
            }

            return registeredSessions;
        }

        if (name.equals("findAndProcessSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            String command = (String) params[1];
            Object expr = Ognl.parseExpression(command);
            Set<IoSession> matches = finder.find(getSource().getManagedSessions().values());

            for (IoSession s: matches) {
                try {
                    Ognl.getValue(expr, s);
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.mina.integration.ognl.IoSessionFinder

    }

    @Override
    protected Object invoke0(String name, Object[] params, String[] signature) throws Exception {
        if (name.equals("findSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            return finder.find(getSource().getManagedSessions().values());
        }

        if (name.equals("findAndRegisterSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            Set<IoSession> registeredSessions = new LinkedHashSet<IoSession>();
            for (IoSession s: finder.find(getSource().getManagedSessions().values())) {
                try {
                    getServer().registerMBean(
                            new IoSessionMBean(s),
                            new ObjectName(
                                    getName().getDomain() +
                                    ":type=session,name=" +
                                    getSessionIdAsString(s.getId())));
                    registeredSessions.add(s);
                } catch (Exception e) {
                    LOGGER.warn("Failed to register a session as a MBean: " + s, e);
                }
            }

            return registeredSessions;
        }

        if (name.equals("findAndProcessSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            String command = (String) params[1];
            Object expr = Ognl.parseExpression(command);
            Set<IoSession> matches = finder.find(getSource().getManagedSessions().values());

            for (IoSession s: matches) {
                try {
                    Ognl.getValue(expr, s);
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.mina.integration.ognl.IoSessionFinder

    }

    @Override
    protected Object invoke0(String name, Object[] params, String[] signature) throws Exception {
        if (name.equals("findSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            return finder.find(getSource().getManagedSessions());
        }
       
        if (name.equals("findAndRegisterSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            Set<IoSession> registeredSessions = new LinkedHashSet<IoSession>();
            for (IoSession s: finder.find(getSource().getManagedSessions())) {
                try {
                    getServer().registerMBean(
                            new IoSessionMBean(s),
                            new ObjectName(
                                    getName().getDomain() +
                                    ":type=session,name=" +
                                    getSessionIdAsString(s.getId())));
                    registeredSessions.add(s);
                } catch (Exception e) {
                    logger.warn("Failed to register a session as a MBean: " + s, e);
                }
            }
           
            return registeredSessions;
        }
       
        if (name.equals("findAndProcessSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            String command = (String) params[1];
            Object expr = Ognl.parseExpression(command);
            Set<IoSession> matches = finder.find(getSource().getManagedSessions());
           
            for (IoSession s: matches) {
                try {
                    Ognl.getValue(expr, s);
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.mina.integration.ognl.IoSessionFinder

    }

    @Override
    protected Object invoke0(String name, Object[] params, String[] signature) throws Exception {
        if (name.equals("findSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            return finder.find(getSource().getManagedSessions().values());
        }

        if (name.equals("findAndRegisterSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            Set<IoSession> registeredSessions = new LinkedHashSet<IoSession>();
            for (IoSession s: finder.find(getSource().getManagedSessions().values())) {
                try {
                    getServer().registerMBean(
                            new IoSessionMBean(s),
                            new ObjectName(
                                    getName().getDomain() +
                                    ":type=session,name=" +
                                    getSessionIdAsString(s.getId())));
                    registeredSessions.add(s);
                } catch (Exception e) {
                    logger.warn("Failed to register a session as a MBean: " + s, e);
                }
            }

            return registeredSessions;
        }

        if (name.equals("findAndProcessSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            String command = (String) params[1];
            Object expr = Ognl.parseExpression(command);
            Set<IoSession> matches = finder.find(getSource().getManagedSessions().values());

            for (IoSession s: matches) {
                try {
                    Ognl.getValue(expr, s);
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.mina.integration.ognl.IoSessionFinder

    }

    @Override
    protected Object invoke0(String name, Object[] params, String[] signature) throws Exception {
        if (name.equals("findSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            return finder.find(getSource().getManagedSessions().values());
        }

        if (name.equals("findAndRegisterSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            Set<IoSession> registeredSessions = new LinkedHashSet<IoSession>();
            for (IoSession s : finder.find(getSource().getManagedSessions().values())) {
                try {
                    getServer().registerMBean(
                            new IoSessionMBean(s),
                            new ObjectName(getName().getDomain() + ":type=session,name="
                                    + getSessionIdAsString(s.getId())));
                    registeredSessions.add(s);
                } catch (Exception e) {
                    LOGGER.warn("Failed to register a session as a MBean: " + s, e);
                }
            }

            return registeredSessions;
        }

        if (name.equals("findAndProcessSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            String command = (String) params[1];
            Object expr = Ognl.parseExpression(command);
            Set<IoSession> matches = finder.find(getSource().getManagedSessions().values());

            for (IoSession s : matches) {
                try {
                    Ognl.getValue(expr, s);
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.mina.integration.ognl.IoSessionFinder

    }

    @Override
    protected Object invoke0(String name, Object[] params, String[] signature) throws Exception {
        if (name.equals("findSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            return finder.find(getSource().getManagedSessions());
        }
       
        if (name.equals("findAndRegisterSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            Set<IoSession> registeredSessions = new LinkedHashSet<IoSession>();
            for (IoSession s: finder.find(getSource().getManagedSessions())) {
                try {
                    getServer().registerMBean(
                            new IoSessionMBean(s),
                            new ObjectName(
                                    getName().getDomain() +
                                    ":type=session,name=" +
                                    getSessionIdAsString(s.getId())));
                    registeredSessions.add(s);
                } catch (Exception e) {
                    logger.warn("Failed to register a session as a MBean: " + s, e);
                }
            }
           
            return registeredSessions;
        }
       
        if (name.equals("findAndProcessSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            String command = (String) params[1];
            Object expr = Ognl.parseExpression(command);
            Set<IoSession> matches = finder.find(getSource().getManagedSessions());
           
            for (IoSession s: matches) {
                try {
                    Ognl.getValue(expr, s);
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.mina.integration.ognl.IoSessionFinder

    }

    @Override
    protected Object invoke0(String name, Object[] params, String[] signature) throws Exception {
        if (name.equals("findSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            return finder.find(getSource().getManagedSessions().values());
        }

        if (name.equals("findAndRegisterSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            Set<IoSession> registeredSessions = new LinkedHashSet<IoSession>();
            for (IoSession s: finder.find(getSource().getManagedSessions().values())) {
                try {
                    getServer().registerMBean(
                            new IoSessionMBean(s),
                            new ObjectName(
                                    getName().getDomain() +
                                    ":type=session,name=" +
                                    getSessionIdAsString(s.getId())));
                    registeredSessions.add(s);
                } catch (Exception e) {
                    LOGGER.warn("Failed to register a session as a MBean: " + s, e);
                }
            }

            return registeredSessions;
        }

        if (name.equals("findAndProcessSessions")) {
            IoSessionFinder finder = new IoSessionFinder((String) params[0]);
            String command = (String) params[1];
            Object expr = Ognl.parseExpression(command);
            Set<IoSession> matches = finder.find(getSource().getManagedSessions().values());

            for (IoSession s: matches) {
                try {
                    Ognl.getValue(expr, s);
                } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.