/** * {@inheritDoc */ @Override public SLEndpointProvider toSLEndpoint(QName serviceName, byte[] content, boolean isLive) { EndpointDataType epd = toEndPointData(content); return new SLEndpointProvider(serviceName, epd, isLive); }
/** * {@inheritDoc} */ @Override public synchronized void connect() throws InterruptedException, ServiceLocatorException { getBackend().connect(); }
/** * {@inheritDoc} */ @Override public synchronized void disconnect() throws InterruptedException, ServiceLocatorException { getBackend().disconnect(); }
/** * {@inheritDoc} */ @Override public synchronized void removeEndpoint(QName serviceName, String endpoint) throws ServiceLocatorException, InterruptedException { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Removing endpoint " + endpoint + " for service " + serviceName + "..."); } RootNode rootNode = getBackend().connect(); ServiceNode serviceNode = rootNode.getServiceNode(serviceName); EndpointNode endpointNode = serviceNode.getEndPoint(endpoint); endpointNode.ensureRemoved(); }
/** * {@inheritDoc} */ @Override public List<QName> getServices() throws InterruptedException, ServiceLocatorException { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Getting all services..."); } RootNode rootNode = getBackend().connect(); return rootNode.getServiceNames(); }
protected NodePath(NodePath parentPath, String childPathSegment, boolean encoded) { checkValidPathSegment(childPathSegment); String encodedChildPathSegment = encoded ? childPathSegment : encode(childPathSegment); path = parentPath.path + SEPARATOR + encodedChildPathSegment; }
/** * Create a <code>NodePath</code>, which is a child of this one. * * @param childNodeName * name of the child node, must not be <code>null</code> */ public NodePath child(String childNodeName) { return new NodePath(this, childNodeName); }
@Override public void run() { performCollection(); } }, collectionInterval, collectionInterval);
/** * {@inheritDoc} */ @Override public synchronized void register(Endpoint epProvider) throws ServiceLocatorException, InterruptedException { register(epProvider, false); }
/** * {@inheritDoc} */ @Override public List<String> lookup(QName serviceName) throws ServiceLocatorException, InterruptedException { return lookup(serviceName, SLPropertiesMatcher.ALL_MATCHER); }
/** * {@inheritDoc} */ @Override public void addPostConnectAction(PostConnectAction postConnectAction) { backend.addPostConnectAction(postConnectAction); }
/** * {@inheritDoc} */ @Override public synchronized void removeEndpoint(QName serviceName, String endpoint) throws ServiceLocatorException, InterruptedException { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Removing endpoint " + endpoint + " for service " + serviceName + "..."); } RootNode rootNode = getBackend().connect(); ServiceNode serviceNode = rootNode.getServiceNode(serviceName); EndpointNode endpointNode = serviceNode.getEndPoint(endpoint); endpointNode.ensureRemoved(); }
/** * {@inheritDoc} */ @Override public List<QName> getServices() throws InterruptedException, ServiceLocatorException { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Getting all services..."); } RootNode rootNode = getBackend().connect(); return rootNode.getServiceNames(); }
/** * {@inheritDoc */ @Override public SLEndpointProvider toSLEndpoint(QName serviceName, byte[] content, boolean isLive) { EndpointDataType epd = toEndPointData(content); return new SLEndpointProvider(serviceName, epd, isLive); }
/** * {@inheritDoc} */ @Override public synchronized void connect() throws InterruptedException, ServiceLocatorException { getBackend().connect(); }
/** * {@inheritDoc} */ @Override public synchronized void disconnect() throws InterruptedException, ServiceLocatorException { getBackend().disconnect(); }
protected NodePath(NodePath parentPath, String childPathSegment, boolean encoded) { checkValidPathSegment(childPathSegment); String encodedChildPathSegment = encoded ? childPathSegment : encode(childPathSegment); path = parentPath.path + SEPARATOR + encodedChildPathSegment; }
/** * Create a <code>NodePath</code>, which is a child of this one. * * @param childNodeName * name of the child node, must not be <code>null</code> */ protected NodePath child(String childNodeName, boolean encoded) { return new NodePath(this, childNodeName, encoded); }
/** * Create a <code>NodePath</code>, which is a child of this one. * * @param childNodeName * name of the child node, must not be <code>null</code> */ public NodePath child(String childNodeName) { return new NodePath(this, childNodeName); }
/** * Create a <code>NodePath</code>, which is a child of this one. * * @param childNodeName * name of the child node, must not be <code>null</code> */ protected NodePath child(String childNodeName, boolean encoded) { return new NodePath(this, childNodeName, encoded); }