Package com.hellblazer.slp

Examples of com.hellblazer.slp.Filter$SetAccessibleAction


                                                                                throws InvalidSyntaxException {
        if (log.isTraceEnabled()) {
            log.trace("adding listener: " + listener + " on query: " + query);
        }
        List<ServiceReference> references;
        listeners.add(new ListenerRegistration(listener, new Filter(query)));
        references = getServiceReferences(null, query);
        for (ServiceReference reference : references) {
            final ServiceReference ref = reference;
            executor.execute(new Runnable() {
                @Override
View Full Code Here


    public ServiceReference getServiceReference(String serviceType)
                                                                   throws InvalidSyntaxException {
        if (serviceType == null) {
            serviceType = "*";
        }
        Filter filter = new Filter("(" + SERVICE_TYPE + "=" + serviceType + ")");
        for (ServiceReference ref : services.values()) {
            if (filter.match(ref)) {
                return ref;
            }
        }
        return null;
    }
View Full Code Here

                                                       String query)
                                                                    throws InvalidSyntaxException {
        if (serviceType == null) {
            serviceType = "*";
        }
        Filter filter;
        if (query == null) {
            filter = new Filter(String.format("(%s=%s)", SERVICE_TYPE,
                                              serviceType));
        } else {
            filter = new Filter(String.format("(&(%s=%s) %s)", SERVICE_TYPE,
                                              serviceType, query));
        }
        ArrayList<ServiceReference> references = new ArrayList<ServiceReference>();
        for (Map.Entry<UUID, ServiceReferenceImpl> entry : services.entrySet()) {
            if (filter.match(entry.getValue())) {
                references.add(entry.getValue());
            }
        }
        return references;
    }
View Full Code Here

     * @see com.hellblazer.slp.ServiceScope#removeServiceListener(com.hellblazer.slp.ServiceListener, java.lang.String)
     */
    @Override
    public void removeServiceListener(ServiceListener listener, String query)
                                                                             throws InvalidSyntaxException {
        listeners.remove(new ListenerRegistration(listener, new Filter(query)));
    }
View Full Code Here

TOP

Related Classes of com.hellblazer.slp.Filter$SetAccessibleAction

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.