public ConnectionPeerIdentityContext getPeerIdentityContext() { final ConnectionPeerIdentityContext peerIdentityContext = this.peerIdentityContext; if (peerIdentityContext == null) { throw Assert.unsupported(); } return peerIdentityContext; }
/** * Unsupported. * * @param e ignored */ public void add(final E e) { throw Assert.unsupported(); } }
/** * Not supported. * * @return nothing * @throws UnsupportedOperationException always */ public String readLine() throws UnsupportedOperationException { throw Assert.unsupported(); }
/** * Add a mapping for the given key at the given position. * * @param key the key * @param idx the index * @param value the mapping value * @throws IndexOutOfBoundsException if {@code idx} is less than 0 or greater than or equal to {@code size(key)} * @throws UnsupportedOperationException if this method is not implemented and the operation is not supported */ default void add(String key, int idx, String value) { throw Assert.unsupported(); }
/** * Unsupported. * * @param e ignored */ public void set(final E e) { throw Assert.unsupported(); }
/** * Unsupported. */ public void remove() { throw Assert.unsupported(); }
/** * Unsupported. * * @param e ignored */ public void add(final E e) { throw Assert.unsupported(); } }
/** * Remove all values for the given key from this collection. * * @param key the key * @return {@code true} if the key was found, {@code false} otherwise * @throws UnsupportedOperationException if this method is not implemented and the operation is not supported */ default boolean remove(String key) { throw Assert.unsupported(); }
/** * Clear this collection, resetting its size to zero. * * @throws UnsupportedOperationException if this method is not implemented and the operation is not supported */ default void clear() { throw Assert.unsupported(); }
public Enumeration<Permission> elements() { // TODO: this is theoretically possible to implement using an IntersectionCollectionPermission; // however the primary use case is going to be in protection domains and verification scenarios so we may // not ever actually need this throw Assert.unsupported(); } }
/** * Unsupported. */ public void remove() { throw Assert.unsupported(); }
/** * Unsupported. * * @param e ignored */ public void set(final E e) { throw Assert.unsupported(); }
public void remove() { throw Assert.unsupported(); } };
@Override public Control[] getResponseControls() throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); return ((LdapContext) delegating).getResponseControls(); }
@Override public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); return ((LdapContext) delegating).extendedOperation(request); }
@Override public Control[] getConnectControls() throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); return ((LdapContext) delegating).getConnectControls(); }
@Override public void setRequestControls(Control[] requestControls) throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); ((LdapContext) delegating).setRequestControls(requestControls); }
@Override public Control[] getRequestControls() throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); return ((LdapContext) delegating).getRequestControls(); }
@Override public LdapContext newInstance(Control[] requestControls) throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); LdapContext newContext = ((LdapContext) delegating).newInstance(requestControls); return new DelegatingLdapContext(newContext, socketFactory); }
@Override public void reconnect(Control[] controls) throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); ClassLoader previous = setSocketFactory(); try { ((LdapContext) delegating).reconnect(controls); } finally { unsetSocketFactory(previous); } }