Package com.adito.core

Examples of com.adito.core.CoreEvent


            try {
                tunnel = TunnelDatabaseFactory.getInstance().createTunnel(user.getRealm().getRealmID(), name, description, type, autoStart, transport,
                                user.getPrincipalName(), sourcePort, new HostService(destinationHost, destinationPort),
                                sourceInterface);
                CoreServlet.getServlet().fireCoreEvent(
                                new CoreEvent(this, TunnelsEventConstants.CREATE_TUNNEL, null, info, CoreEvent.STATE_SUCCESSFUL)
                                                .addAttribute(CoreAttributeConstants.EVENT_ATTR_RESOURCE_NAME, name)
                                                .addAttribute(CoreAttributeConstants.EVENT_ATTR_RESOURCE_DESCRIPTION, description)
                                                .addAttribute(TunnelsEventConstants.EVENT_ATTR_TUNNEL_SOURCE_PORT,
                                                                Integer.toString(sourcePort)).addAttribute(
                                                                                TunnelsEventConstants.EVENT_ATTR_TUNNEL_DESTINATION,
                                                                String.valueOf(destinationHost + ":" + destinationPort))
                                                .addAttribute(TunnelsEventConstants.EVENT_ATTR_TUNNEL_TRANSPORT, transport)
                                                .addAttribute(
                                                                TunnelsEventConstants.EVENT_ATTR_TUNNEL_TYPE,
                                                                ((LabelValueBean) TransportType.TYPES.get(tunnel.getType()))
                                                                                .getLabel()));
            } catch (Exception e) {
                CoreServlet.getServlet().fireCoreEvent(
                                new CoreEvent(this, TunnelsEventConstants.CREATE_TUNNEL, null, info, CoreEvent.STATE_UNSUCCESSFUL)
                                                .addAttribute(CoreAttributeConstants.EVENT_ATTR_RESOURCE_NAME, name)
                                                .addAttribute(CoreAttributeConstants.EVENT_ATTR_RESOURCE_DESCRIPTION, description)
                                                .addAttribute(TunnelsEventConstants.EVENT_ATTR_TUNNEL_SOURCE_PORT,
                                                                Integer.toString(sourcePort)).addAttribute(
                                                                                TunnelsEventConstants.EVENT_ATTR_TUNNEL_DESTINATION,
View Full Code Here


                if (f != null) {
                    for (int i = 0; i < f.length; i++) {
                        f[i].delete();
                    }
                }
                CoreServlet.getServlet().fireCoreEvent(new CoreEvent(this, CoreEventConstants.MESSAGE_QUEUE_CLEARED, null, null, CoreEvent.STATE_SUCCESSFUL));
            } catch (Exception e) {
                log.error("Failed to clear messages from queue", e);
                CoreServlet.getServlet().fireCoreEvent(new CoreEvent(this, CoreEventConstants.MESSAGE_QUEUE_CLEARED, null, null, CoreEvent.STATE_UNSUCCESSFUL));
            }
        }
    }
View Full Code Here

            fireQueuedEvent(message);
        }
    }

    void fireQueuedEvent(Message message) {
        fireMessageEvent(message, new CoreEvent(this, CoreEventConstants.MESSAGE_QUEUED, message, null, CoreEvent.STATE_SUCCESSFUL));
    }
View Full Code Here

    void fireQueuedEvent(Message message) {
        fireMessageEvent(message, new CoreEvent(this, CoreEventConstants.MESSAGE_QUEUED, message, null, CoreEvent.STATE_SUCCESSFUL));
    }

    void fireSentEvent(Message message, int state) {
        fireMessageEvent(message, new CoreEvent(this, CoreEventConstants.MESSAGE_SENT, message, null, state));
    }
View Full Code Here

TOP

Related Classes of com.adito.core.CoreEvent

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.