Package org.osgi.service.wireadmin

Examples of org.osgi.service.wireadmin.Wire


    public Wire createWire(MessageInjectionManager consumer) {
        if (wireAdmin != null ) {
            Properties wireProperties = new Properties();
            wireProperties.put(MessageProviderHandler.ATT_SESSION_ID, sessionId);
           
            Wire wire = wireAdmin.createWire(this.producerId, consumer.getConsumerId(), wireProperties);
           
            synchronized (this) {
                wires.put(consumer.getInstance().getDeclaration().getName(),wire);
      }
           
View Full Code Here


    /**
     * Deletes an existing wire, at the wire admin level, towards the specified consumer
     */
    public Wire deleteWire(MessageInjectionManager consumer) {

        Wire wire = null;
        synchronized (this) {
          wire = wires.remove(consumer.getInstance().getDeclaration().getName());
    }

        /*
 
View Full Code Here

                pw.println("Status: Wire Admin service not available");
            }
            else
            {
                final WireAdmin wireAdmin = (WireAdmin) service;
                final Wire wires[] = wireAdmin.getWires(null);

                if (null == wires || 0 == wires.length)
                {
                    pw.println("Status: No wires available");
                }
                else
                {
                    final int len = wires.length;
                    int valid = 0;
                    int connected = 0;

                    // status
                    for (int i = 0; i < len; i++)
                    {
                        final Wire wire = wires[i];
                        if (wire.isValid())
                            valid++;
                        if (wire.isConnected())
                            connected++;
                    }
                    pw.print("Status: ");
                    pw.print(len);
                    pw.print(" wires available, ");
View Full Code Here

TOP

Related Classes of org.osgi.service.wireadmin.Wire

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.