/projects/quickserver-1.4.7/docs/org/quickserver/net/server/ClientExtendedEventHandler.html
https://gitlab.com/essere.lab.public/qualitas.class-corpus · HTML · 326 lines · 255 code · 46 blank · 25 comment · 0 complexity · beda326d8106a0d9bce85234f9780b55 MD5 · raw file
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc (build 1.4.2_09) on Wed Mar 01 21:02:08 GMT+05:30 2006 -->
- <TITLE>
- ClientExtendedEventHandler (QuickServer v1.4.7 API Specification)
- </TITLE>
-
- <META NAME="keywords" CONTENT="org.quickserver.net.server.ClientExtendedEventHandler interface">
-
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
-
- <SCRIPT type="text/javascript">
- function windowTitle()
- {
- parent.document.title="ClientExtendedEventHandler (QuickServer v1.4.7 API Specification)";
- }
- </SCRIPT>
-
- </HEAD>
-
- <BODY BGCOLOR="white" onload="windowTitle();">
-
- <!-- ========= START OF TOP NAVBAR ======= -->
- <A NAME="navbar_top"><!-- --></A>
- <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ClientExtendedEventHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- <b>QuickServer</b><br><font size="-1">v1.4.7</font></EM>
- </TD>
- </TR>
-
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../org/quickserver/net/server/ClientEventHandler.html" title="interface in org.quickserver.net.server"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/quickserver/net/server/ClientHandler.html" title="interface in org.quickserver.net.server"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
- <A HREF="ClientExtendedEventHandler.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
-
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_top"></A>
- <!-- ========= END OF TOP NAVBAR ========= -->
-
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- org.quickserver.net.server</FONT>
- <BR>
- Interface ClientExtendedEventHandler</H2>
- <HR>
- <DL>
- <DT>public interface <B>ClientExtendedEventHandler</B></DL>
-
- <P>
- This interface defines the methods that should be implemented by any
- class that wants to handle extended client events.
-
- <p>
- Recommendations to be followed when implementing ClientExtendedEventHandler
- <ul>
- <li>Should have a default constructor.
- <li>Should be thread safe.
- <li>It should not store any data that may is associated with a particular client.
- <li>If any client data is need to be saved from the client session,
- it should be saved to a <A HREF="../../../../org/quickserver/net/server/ClientData.html" title="interface in org.quickserver.net.server"><CODE>ClientData</CODE></A> class, which can be retrieved
- using handler.getClientData() method.
- </ul>
- </p>
- <p>
- Ex:
- <code><BLOCKQUOTE><pre>
- package echoserver;
- import java.net.*;
- import java.io.*;
- import org.quickserver.net.server.ClientExtendedEventHandler;
- import org.quickserver.net.server.ClientHandler;
- public class EchoExtendedEventHandler implements ClientExtendedEventHandler {
- public void handleTimeout(ClientHandler handler)
- throws SocketException, IOException {
- handler.sendClientMsg("-ERR Timeout");
- if(true) throw new SocketException();
- }
- public void handleMaxAuthTry(ClientHandler handler) throws IOException {
- handler.sendClientMsg("-ERR Max Auth Try Reached");
- }
- public boolean handleMaxConnection(ClientHandler handler) throws IOException {
- //for now lets reject all excess clients
- if(true) {
- handler.sendClientMsg("Server Busy - Max Connection Reached");
- return false;
- }
- }
- }
- </pre></BLOCKQUOTE></code></p>
- <P>
-
- <P>
- <DL>
- <DT><B>Since:</B></DT>
- <DD>1.4.6</DD>
- <DT><B>Author:</B></DT>
- <DD>Akshathkumar Shetty</DD>
- </DL>
- <HR>
-
- <P>
- <!-- ======== NESTED CLASS SUMMARY ======== -->
-
-
- <!-- =========== FIELD SUMMARY =========== -->
-
-
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
-
-
- <!-- ========== METHOD SUMMARY =========== -->
-
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TD COLSPAN=2><FONT SIZE="+2">
- <B>Method Summary</B></FONT></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/quickserver/net/server/ClientExtendedEventHandler.html#handleMaxAuthTry(org.quickserver.net.server.ClientHandler)">handleMaxAuthTry</A></B>(<A HREF="../../../../org/quickserver/net/server/ClientHandler.html" title="interface in org.quickserver.net.server">ClientHandler</A> handler)</CODE>
-
- <BR>
- Method called when client has reached maximum auth tries.</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/quickserver/net/server/ClientExtendedEventHandler.html#handleMaxConnection(org.quickserver.net.server.ClientHandler)">handleMaxConnection</A></B>(<A HREF="../../../../org/quickserver/net/server/ClientHandler.html" title="interface in org.quickserver.net.server">ClientHandler</A> handler)</CODE>
-
- <BR>
- Method called when maximum number of clients has been reached and
- a new client connects.</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/quickserver/net/server/ClientExtendedEventHandler.html#handleTimeout(org.quickserver.net.server.ClientHandler)">handleTimeout</A></B>(<A HREF="../../../../org/quickserver/net/server/ClientHandler.html" title="interface in org.quickserver.net.server">ClientHandler</A> handler)</CODE>
-
- <BR>
- Method called when client timeouts.</TD>
- </TR>
- </TABLE>
-
- <P>
-
- <!-- ============ FIELD DETAIL =========== -->
-
-
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
-
-
- <!-- ============ METHOD DETAIL ========== -->
-
- <A NAME="method_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TD COLSPAN=1><FONT SIZE="+2">
- <B>Method Detail</B></FONT></TD>
- </TR>
- </TABLE>
-
- <A NAME="handleTimeout(org.quickserver.net.server.ClientHandler)"><!-- --></A><H3>
- handleTimeout</H3>
- <PRE>
- public void <B>handleTimeout</B>(<A HREF="../../../../org/quickserver/net/server/ClientHandler.html" title="interface in org.quickserver.net.server">ClientHandler</A> handler)
- throws java.net.SocketException,
- java.io.IOException</PRE>
- <DL>
- <DD>Method called when client timeouts.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.net.SocketException</CODE> - if client socket needs to be closed.
- <DD><CODE>java.io.IOException</CODE> - if io error in socket</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="handleMaxAuthTry(org.quickserver.net.server.ClientHandler)"><!-- --></A><H3>
- handleMaxAuthTry</H3>
- <PRE>
- public void <B>handleMaxAuthTry</B>(<A HREF="../../../../org/quickserver/net/server/ClientHandler.html" title="interface in org.quickserver.net.server">ClientHandler</A> handler)
- throws java.io.IOException</PRE>
- <DL>
- <DD>Method called when client has reached maximum auth tries.
- After this method call QuickServer will close the clients socket.
- Should be used to give error information to the client.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.io.IOException</CODE> - if io error in socket</DL>
- </DD>
- </DL>
- <HR>
-
- <A NAME="handleMaxConnection(org.quickserver.net.server.ClientHandler)"><!-- --></A><H3>
- handleMaxConnection</H3>
- <PRE>
- public boolean <B>handleMaxConnection</B>(<A HREF="../../../../org/quickserver/net/server/ClientHandler.html" title="interface in org.quickserver.net.server">ClientHandler</A> handler)
- throws java.io.IOException</PRE>
- <DL>
- <DD>Method called when maximum number of clients has been reached and
- a new client connects. If this method return <code>true</code> the
- client is accepted else client connection is closed.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.io.IOException</CODE> - if io error in socket</DL>
- </DD>
- </DL>
- <!-- ========= END OF CLASS DATA ========= -->
- <HR>
-
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <A NAME="navbar_bottom"><!-- --></A>
- <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_bottom_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ClientExtendedEventHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- <b>QuickServer</b><br><font size="-1">v1.4.7</font></EM>
- </TD>
- </TR>
-
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../org/quickserver/net/server/ClientEventHandler.html" title="interface in org.quickserver.net.server"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/quickserver/net/server/ClientHandler.html" title="interface in org.quickserver.net.server"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
- <A HREF="ClientExtendedEventHandler.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
-
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_bottom"></A>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
-
- <HR>
- Copyright © 2003-2006 QuickServer.org
- </BODY>
- </HTML>