📄 sslfilter.html
字号:
<BR> Filters <A HREF="../../../../../org/apache/mina/common/IoHandler.html#messageSent(org.apache.mina.common.IoSession, java.lang.Object)"><CODE>IoHandler.messageSent(IoSession,Object)</CODE></A> event.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#onPostAdd(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)">onPostAdd</A></B>(<A HREF="../../../../../org/apache/mina/common/IoFilterChain.html" title="interface in org.apache.mina.common">IoFilterChain</A> parent, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name, <A HREF="../../../../../org/apache/mina/common/IoFilter.NextFilter.html" title="interface in org.apache.mina.common">IoFilter.NextFilter</A> nextFilter)</CODE><BR> Invoked after this filter is added to the specified <tt>parent</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#onPreAdd(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)">onPreAdd</A></B>(<A HREF="../../../../../org/apache/mina/common/IoFilterChain.html" title="interface in org.apache.mina.common">IoFilterChain</A> parent, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name, <A HREF="../../../../../org/apache/mina/common/IoFilter.NextFilter.html" title="interface in org.apache.mina.common">IoFilter.NextFilter</A> nextFilter)</CODE><BR> Invoked before this filter is added to the specified <tt>parent</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#onPreRemove(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)">onPreRemove</A></B>(<A HREF="../../../../../org/apache/mina/common/IoFilterChain.html" title="interface in org.apache.mina.common">IoFilterChain</A> parent, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> name, <A HREF="../../../../../org/apache/mina/common/IoFilter.NextFilter.html" title="interface in org.apache.mina.common">IoFilter.NextFilter</A> nextFilter)</CODE><BR> Invoked before this filter is removed from the specified <tt>parent</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#sessionClosed(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession)">sessionClosed</A></B>(<A HREF="../../../../../org/apache/mina/common/IoFilter.NextFilter.html" title="interface in org.apache.mina.common">IoFilter.NextFilter</A> nextFilter, <A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A> session)</CODE><BR> Filters <A HREF="../../../../../org/apache/mina/common/IoHandler.html#sessionClosed(org.apache.mina.common.IoSession)"><CODE>IoHandler.sessionClosed(IoSession)</CODE></A> event.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#setEnabledCipherSuites(java.lang.String[])">setEnabledCipherSuites</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] cipherSuites)</CODE><BR> Sets the list of cipher suites to be enabled when <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLEngine.html?is-external=true" title="class or interface in javax.net.ssl"><CODE>SSLEngine</CODE></A> is initialized.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#setEnabledProtocols(java.lang.String[])">setEnabledProtocols</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] protocols)</CODE><BR> Sets the list of protocols to be enabled when <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLEngine.html?is-external=true" title="class or interface in javax.net.ssl"><CODE>SSLEngine</CODE></A> is initialized.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#setNeedClientAuth(boolean)">setNeedClientAuth</A></B>(boolean needClientAuth)</CODE><BR> Configures the engine to <em>require</em> client authentication.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#setUseClientMode(boolean)">setUseClientMode</A></B>(boolean clientMode)</CODE><BR> Configures the engine to use client (or server) mode when handshaking.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#setWantClientAuth(boolean)">setWantClientAuth</A></B>(boolean wantClientAuth)</CODE><BR> Configures the engine to <em>request</em> client authentication.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#startSsl(org.apache.mina.common.IoSession)">startSsl</A></B>(<A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A> session)</CODE><BR> (Re)starts SSL session for the specified <tt>session</tt> if not started yet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../org/apache/mina/common/WriteFuture.html" title="interface in org.apache.mina.common">WriteFuture</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#stopSsl(org.apache.mina.common.IoSession)">stopSsl</A></B>(<A HREF="../../../../../org/apache/mina/common/IoSession.html" title="interface in org.apache.mina.common">IoSession</A> session)</CODE><BR> Stops the SSL session by sending TLS <tt>close_notify</tt> message to initiate TLS closure.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.apache.mina.common.IoFilterAdapter"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class org.apache.mina.common.<A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html" title="class in org.apache.mina.common">IoFilterAdapter</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#destroy()">destroy</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#filterSetTrafficMask(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession, org.apache.mina.common.TrafficMask)">filterSetTrafficMask</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#init()">init</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#onPostRemove(org.apache.mina.common.IoFilterChain, java.lang.String, org.apache.mina.common.IoFilter.NextFilter)">onPostRemove</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#sessionCreated(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession)">sessionCreated</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#sessionIdle(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession, org.apache.mina.common.IdleStatus)">sessionIdle</A>, <A HREF="../../../../../org/apache/mina/common/IoFilterAdapter.html#sessionOpened(org.apache.mina.common.IoFilter.NextFilter, org.apache.mina.common.IoSession)">sessionOpened</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_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>Field Detail</B></FONT></TH></TR></TABLE><A NAME="SSL_SESSION"><!-- --></A><H3>SSL_SESSION</H3><PRE>public static final <A HREF="../../../../../org/apache/mina/common/AttributeKey.html" title="class in org.apache.mina.common">AttributeKey</A> <B>SSL_SESSION</B></PRE><DL><DD>A session attribute key that stores 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 each session.<P><DL></DL></DL><HR><A NAME="DISABLE_ENCRYPTION_ONCE"><!-- --></A><H3>DISABLE_ENCRYPTION_ONCE</H3><PRE>public static final <A HREF="../../../../../org/apache/mina/common/AttributeKey.html" title="class in org.apache.mina.common">AttributeKey</A> <B>DISABLE_ENCRYPTION_ONCE</B></PRE><DL><DD>A session attribute key that makes next one write request bypass this filter (not encrypting the data). This is a marker attribute, which means that you can put whatever as its value. (<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Boolean.html?is-external=true#TRUE" title="class or interface in java.lang"><CODE>Boolean.TRUE</CODE></A> is preferred.) The attribute is automatically removed from the session attribute map as soon as <A HREF="../../../../../org/apache/mina/common/IoSession.html#write(java.lang.Object)"><CODE>IoSession.write(Object)</CODE></A> is invoked, and therefore should be put again if you want to make more messages bypass this filter. This is especially useful when you implement StartTLS.<P><DL></DL></DL><HR><A NAME="USE_NOTIFICATION"><!-- --></A><H3>USE_NOTIFICATION</H3><PRE>public static final <A HREF="../../../../../org/apache/mina/common/AttributeKey.html" title="class in org.apache.mina.common">AttributeKey</A> <B>USE_NOTIFICATION</B></PRE><DL><DD>A session attribute key that makes this filter to emit 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 with a special message (<A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#SESSION_SECURED"><CODE>SESSION_SECURED</CODE></A> or <A HREF="../../../../../org/apache/mina/filter/ssl/SslFilter.html#SESSION_UNSECURED"><CODE>SESSION_UNSECURED</CODE></A>). This is a marker attribute, which means that you can put whatever as its value. (<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Boolean.html?is-external=true#TRUE" title="class or interface in java.lang"><CODE>Boolean.TRUE</CODE></A> is preferred.) By default, this filter doesn't emit any events related with SSL session flow control.<P><DL></DL></DL><HR><A NAME="PEER_ADDRESS"><!-- --></A><H3>PEER_ADDRESS</H3><PRE>public static final <A HREF="../../../../../org/apache/mina/common/AttributeKey.html" title="class in org.apache.mina.common">AttributeKey</A> <B>PEER_ADDRESS</B></PRE><DL><DD>A session attribute key that should be set to an <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net"><CODE>InetSocketAddress</CODE></A>. Setting this attribute causes <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> to be called passing the hostname and port of the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net"><CODE>InetSocketAddress</CODE></A> to get an <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLEngine.html?is-external=true" title="class or interface in javax.net.ssl"><CODE>SSLEngine</CODE></A> instance. If not set <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/javax/net/ssl/SSLContext.html?is-external=true#createSSLEngine()" title="class or interface in javax.net.ssl"><CODE>SSLContext.createSSLEngine()</CODE></A> will be called.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -