Lines Matching defs:protocol

30  * The public API for secure socket protocol implementations. It acts as factory
83 * Creates a new {@code SSLContext} instance for the specified protocol.
85 * @param protocol
86 * the requested protocol to create a context for.
89 * if no installed provider can provide the requested protocol
91 * if {@code protocol} is {@code null} (instead of
94 public static SSLContext getInstance(String protocol) throws NoSuchAlgorithmException {
95 if (protocol == null) {
96 throw new NullPointerException("protocol == null");
98 Engine.SpiAndProvider sap = ENGINE.getInstance(protocol, null);
99 return new SSLContext((SSLContextSpi) sap.spi, sap.provider, protocol);
103 * Creates a new {@code SSLContext} instance for the specified protocol from
106 * @param protocol
107 * the requested protocol to create a context for.
109 * the name of the provider that provides the requested protocol.
110 * @return an {@code SSLContext} for the requested protocol.
113 * protocol.
117 * if {@code protocol} is {@code null} (instead of
120 public static SSLContext getInstance(String protocol, String provider)
132 return getInstance(protocol, impProvider);
136 * Creates a new {@code SSLContext} instance for the specified protocol from
139 * @param protocol
140 * the requested protocol to create a context for
142 * the provider that provides the requested protocol.
143 * @return an {@code SSLContext} for the requested protocol.
146 * protocol.
148 * if {@code protocol} is {@code null} (instead of
151 public static SSLContext getInstance(String protocol, Provider provider)
156 if (protocol == null) {
157 throw new NullPointerException("protocol == null");
159 Object spi = ENGINE.getInstance(protocol, provider, null);
160 return new SSLContext((SSLContextSpi) spi, provider, protocol);
167 private final String protocol;
176 * @param protocol
177 * the protocol name.
179 protected SSLContext(SSLContextSpi contextSpi, Provider provider, String protocol) {
181 this.protocol = protocol;
186 * Returns the name of the secure socket protocol of this instance.
188 * @return the name of the secure socket protocol of this instance.
191 return protocol;