/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return getId().hashCode(); }
/** * Compares this {@code EndpointDescription} object to another object. * * <p> * An Endpoint Description is considered to be <b>equal to</b> another * Endpoint Description if their ids are equal. * * @param other The {@code EndpointDescription} object to be compared. * @return {@code true} if {@code object} is a {@code EndpointDescription} * and is equal to this object; {@code false} otherwise. */ public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof EndpointDescription)) { return false; } return getId().equals(((EndpointDescription) other).getId()); }
/** * Create a permission name from a EndpointDescription. * * @param endpoint EndpointDescription to use to create permission name. * @return permission name. */ private static String createName(EndpointDescription endpoint) { if (endpoint == null) { throw new IllegalArgumentException("invalid endpoint: null"); } StringBuffer sb = new StringBuffer("(" + ENDPOINT_ID + "="); sb.append(endpoint.getId()); sb.append(")"); return sb.toString(); }
/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ @Override public int hashCode() { return getId().hashCode(); }
/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return getId().hashCode(); }
/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ @Override public int hashCode() { return getId().hashCode(); }
/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return getId().hashCode(); }
/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return getId().hashCode(); }
/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return getId().hashCode(); }
/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return getId().hashCode(); }
/** * Returns a hash code value for the object. * * @return An integer which is a hash code value for this object. */ public int hashCode() { return getId().hashCode(); }
/** * Create a permission name from a EndpointDescription. * * @param endpoint EndpointDescription to use to create permission name. * @return permission name. */ private static String createName(EndpointDescription endpoint) { if (endpoint == null) { throw new IllegalArgumentException("invalid endpoint: null"); } StringBuilder sb = new StringBuilder("(" + ENDPOINT_ID + "="); sb.append(endpoint.getId()); sb.append(")"); return sb.toString(); }
/** * Create a permission name from a EndpointDescription. * * @param endpoint EndpointDescription to use to create permission name. * @return permission name. */ private static String createName(EndpointDescription endpoint) { if (endpoint == null) { throw new IllegalArgumentException("invalid endpoint: null"); } StringBuffer sb = new StringBuffer("(" + ENDPOINT_ID + "="); sb.append(endpoint.getId()); sb.append(")"); return sb.toString(); }
/** * Remove a Server Endpoint. * * @param endpoint The Endpoint Description */ public HttpServerEndpoint removeEndpoint(EndpointDescription endpoint) { HttpServerEndpoint serv; m_lock.writeLock().lock(); try { serv = m_handlers.remove(endpoint.getId()); } finally { m_lock.writeLock().unlock(); } return serv; }
/** * Create a permission name from a EndpointDescription. * * @param endpoint EndpointDescription to use to create permission name. * @return permission name. */ private static String createName(EndpointDescription endpoint) { if (endpoint == null) { throw new IllegalArgumentException("invalid endpoint: null"); } StringBuffer sb = new StringBuffer("(" + ENDPOINT_ID + "="); sb.append(endpoint.getId()); sb.append(")"); return sb.toString(); }
/** * Create a permission name from a EndpointDescription. * * @param endpoint EndpointDescription to use to create permission name. * @return permission name. */ private static String createName(EndpointDescription endpoint) { if (endpoint == null) { throw new IllegalArgumentException("invalid endpoint: null"); } StringBuffer sb = new StringBuffer("(" + ENDPOINT_ID + "="); sb.append(endpoint.getId()); sb.append(")"); return sb.toString(); }
@Override public void close() throws IOException { server.unregisterService(description.getId()); } };
public void removeEndpoint(EndpointDescription endpoint) { m_discovery.logDebug("Removing published endpoint: %s", endpoint); m_lock.writeLock().lock(); try { m_modified = nextLastModified(m_modified); m_endpoints.remove(endpoint.getId()); m_modifieds.remove(endpoint.getId()); m_endpointsArray = m_endpoints.values().toArray(new EndpointDescription[m_endpoints.size()]); } finally { m_lock.writeLock().unlock(); } }
public void addEndpoint(EndpointDescription endpoint) { m_discovery.logDebug("Adding published endpoint: %s", endpoint); m_lock.writeLock().lock(); try { m_modified = nextLastModified(m_modified); m_endpoints.put(endpoint.getId(), endpoint); m_modifieds.put(endpoint.getId(), m_modified); m_endpointsArray = m_endpoints.values().toArray(new EndpointDescription[m_endpoints.size()]); } finally { m_lock.writeLock().unlock(); } }
@Override public Object importEndpoint(ClassLoader cl, BundleContext consumerContext, Class[] interfaces, EndpointDescription endpoint) throws IntentUnsatisfiedException { String address = (String) endpoint.getProperties().get(FASTBIN_ADDRESS); InvocationHandler handler = client.getProxy(address, endpoint.getId(), cl); return Proxy.newProxyInstance(cl, interfaces, handler); }