⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sslfilter.html

📁 MINA+API 关于MINA的API
💻 HTML
📖 第 1 页 / 共 5 页
字号:
 . Using this feature <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLSession.html?is-external=true" title="class or interface in javax.net.ssl"><CODE>SSLSession</CODE></A> objects may be cached and reused when in client mode.<P><DL><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLContext.html?is-external=true#createSSLEngine(java.lang.String, int)" title="class or interface in javax.net.ssl"><CODE>SSLContext.createSSLEngine(String, int)</CODE></A></DL></DL><HR><A NAME="SESSION_SECURED"><!-- --></A><H3>SESSION_SECURED</H3><PRE>public static final <A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.SslFilterMessage.html" title="class in org.apache.mina.filter.ssl">SslFilter.SslFilterMessage</A> <B>SESSION_SECURED</B></PRE><DL><DD>A special message object which is emitted with a <A HREF="../../../../../org/apache/mina/common/IoHandler.html#messageReceived(org.apache.mina.common.IoSession, java.lang.Object)"><CODE>IoHandler.messageReceived(IoSession, Object)</CODE></A> event when the session is secured and its <A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#USE_NOTIFICATION"><CODE>USE_NOTIFICATION</CODE></A> attribute is set.<P><DL></DL></DL><HR><A NAME="SESSION_UNSECURED"><!-- --></A><H3>SESSION_UNSECURED</H3><PRE>public static final <A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.SslFilterMessage.html" title="class in org.apache.mina.filter.ssl">SslFilter.SslFilterMessage</A> <B>SESSION_UNSECURED</B></PRE><DL><DD>A special message object which is emitted with a <A HREF="../../../../../org/apache/mina/common/IoHandler.html#messageReceived(org.apache.mina.common.IoSession, java.lang.Object)"><CODE>IoHandler.messageReceived(IoSession, Object)</CODE></A> event when the session is not secure anymore and its <A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#USE_NOTIFICATION"><CODE>USE_NOTIFICATION</CODE></A> attribute is set.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="SslFilter(javax.net.ssl.SSLContext)"><!-- --></A><H3>SslFilter</H3><PRE>public <B>SslFilter</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLContext.html?is-external=true" title="class or interface in javax.net.ssl">SSLContext</A>&nbsp;sslContext)</PRE><DL><DD>Creates a new SSL filter using the specified <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLContext.html?is-external=true" title="class or interface in javax.net.ssl"><CODE>SSLContext</CODE></A>.<P></DL><HR><A NAME="SslFilter(javax.net.ssl.SSLContext, boolean)"><!-- --></A><H3>SslFilter</H3><PRE>public <B>SslFilter</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLContext.html?is-external=true" title="class or interface in javax.net.ssl">SSLContext</A>&nbsp;sslContext,                 boolean&nbsp;autoStart)</PRE><DL><DD>Creates a new SSL filter using the specified <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLContext.html?is-external=true" title="class or interface in javax.net.ssl"><CODE>SSLContext</CODE></A>.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getSslSession(org.apache.mina.common.IoSession)"><!-- --></A><H3>getSslSession</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLSession.html?is-external=true" title="class or interface in javax.net.ssl">SSLSession</A> <B>getSslSession</B>(<A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A>&nbsp;session)</PRE><DL><DD>Returns the underlying <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLSession.html?is-external=true" title="class or interface in javax.net.ssl"><CODE>SSLSession</CODE></A> for the specified session.<P><DD><DL><DT><B>Returns:</B><DD><tt>null</tt> if no <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLSession.html?is-external=true" title="class or interface in javax.net.ssl"><CODE>SSLSession</CODE></A> is initialized yet.</DL></DD></DL><HR><A NAME="startSsl(org.apache.mina.common.IoSession)"><!-- --></A><H3>startSsl</H3><PRE>public boolean <B>startSsl</B>(<A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A>&nbsp;session)                 throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLException.html?is-external=true" title="class or interface in javax.net.ssl">SSLException</A></PRE><DL><DD>(Re)starts SSL session for the specified <tt>session</tt> if not started yet. Please note that SSL session is automatically started by default, and therefore you don't need to call this method unless you've used TLS closure.<P><DD><DL><DT><B>Returns:</B><DD><tt>true</tt> if the SSL session has been started, <tt>false</tt> if already started.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLException.html?is-external=true" title="class or interface in javax.net.ssl">SSLException</A></CODE> - if failed to start the SSL session</DL></DD></DL><HR><A NAME="isSslStarted(org.apache.mina.common.IoSession)"><!-- --></A><H3>isSslStarted</H3><PRE>public boolean <B>isSslStarted</B>(<A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A>&nbsp;session)</PRE><DL><DD>Returns <tt>true</tt> if and only if the specified <tt>session</tt> is encrypted/decrypted over SSL/TLS currently.  This method will start to retun <tt>false</tt> after TLS <tt>close_notify</tt> message is sent and any messages written after then is not goinf to get encrypted.<P><DD><DL></DL></DD></DL><HR><A NAME="stopSsl(org.apache.mina.common.IoSession)"><!-- --></A><H3>stopSsl</H3><PRE>public <A HREF="../../../../../org/apache/mina/common/WriteFuture.html" title="interface in org.apache.mina.common">WriteFuture</A> <B>stopSsl</B>(<A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A>&nbsp;session)                    throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLException.html?is-external=true" title="class or interface in javax.net.ssl">SSLException</A></PRE><DL><DD>Stops the SSL session by sending TLS <tt>close_notify</tt> message to initiate TLS closure.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>session</CODE> - the <A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common"><CODE>IoSession</CODE></A> to initiate TLS closure<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLException.html?is-external=true" title="class or interface in javax.net.ssl">SSLException</A></CODE> - if failed to initiate TLS closure<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if this filter is not managing the specified session</DL></DD></DL><HR><A NAME="isUseClientMode()"><!-- --></A><H3>isUseClientMode</H3><PRE>public boolean <B>isUseClientMode</B>()</PRE><DL><DD>Returns <tt>true</tt> if the engine is set to use client mode when handshaking.<P><DD><DL></DL></DD></DL><HR><A NAME="setUseClientMode(boolean)"><!-- --></A><H3>setUseClientMode</H3><PRE>public void <B>setUseClientMode</B>(boolean&nbsp;clientMode)</PRE><DL><DD>Configures the engine to use client (or server) mode when handshaking.<P><DD><DL></DL></DD></DL><HR><A NAME="isNeedClientAuth()"><!-- --></A><H3>isNeedClientAuth</H3><PRE>public boolean <B>isNeedClientAuth</B>()</PRE><DL><DD>Returns <tt>true</tt> if the engine will <em>require</em> client authentication. This option is only useful to engines in the server mode.<P><DD><DL></DL></DD></DL><HR><A NAME="setNeedClientAuth(boolean)"><!-- --></A><H3>setNeedClientAuth</H3><PRE>public void <B>setNeedClientAuth</B>(boolean&nbsp;needClientAuth)</PRE><DL><DD>Configures the engine to <em>require</em> client authentication. This option is only useful for engines in the server mode.<P><DD><DL></DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -