Examples of DiscoveryEvent


Examples of org.apache.activemq.apollo.openwire.command.DiscoveryEvent

   
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new DiscoveryEvent();
    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.DiscoveryEvent

     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        DiscoveryEvent info = (DiscoveryEvent)o;
        info.setServiceName(tightUnmarshalString(dataIn, bs));
        info.setBrokerName(tightUnmarshalString(dataIn, bs));

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.DiscoveryEvent

    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        DiscoveryEvent info = (DiscoveryEvent)o;

        int rc = super.tightMarshal1(wireFormat, o, bs);
        rc += tightMarshalString1(info.getServiceName(), bs);
        rc += tightMarshalString1(info.getBrokerName(), bs);

        return rc + 0;
    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.DiscoveryEvent

     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

        DiscoveryEvent info = (DiscoveryEvent)o;
        tightMarshalString2(info.getServiceName(), dataOut, bs);
        tightMarshalString2(info.getBrokerName(), dataOut, bs);

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.DiscoveryEvent

     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

        DiscoveryEvent info = (DiscoveryEvent)o;
        info.setServiceName(looseUnmarshalString(dataIn));
        info.setBrokerName(looseUnmarshalString(dataIn));

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.DiscoveryEvent

    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        DiscoveryEvent info = (DiscoveryEvent)o;

        super.looseMarshal(wireFormat, o, dataOut);
        looseMarshalString(info.getServiceName(), dataOut);
        looseMarshalString(info.getBrokerName(), dataOut);

    }
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.DiscoveryEvent

   
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new DiscoveryEvent();
    }
View Full Code Here

Examples of org.apache.activemq.command.DiscoveryEvent

    public void addService(JmDNS jmDNS, String type, String name) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("addService with type: " + type + " name: " + name);
        }
        if (listener != null) {
            listener.onServiceAdd(new DiscoveryEvent(name));
        }
        jmDNS.requestServiceInfo(type, name);
    }
View Full Code Here

Examples of org.apache.activemq.command.DiscoveryEvent

    public void removeService(JmDNS jmDNS, String type, String name) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("removeService with type: " + type + " name: " + name);
        }
        if (listener != null) {
            listener.onServiceRemove(new DiscoveryEvent(name));
        }
    }
View Full Code Here

Examples of org.apache.activemq.command.DiscoveryEvent

        }
    }

    private void fireServiceRemovedEvent(RemoteBrokerData data) {
        if (discoveryListener != null) {
            final DiscoveryEvent event = new DiscoveryEvent(data.service);
            event.setBrokerName(data.brokerName);

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
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.