KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > lib > cvsclient > response > OKResponse


1 /*****************************************************************************
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14
15  * The Original Software is the CVS Client Library.
16  * The Initial Developer of the Original Software is Robert Greig.
17  * Portions created by Robert Greig are Copyright (C) 2000.
18  * All Rights Reserved.
19
20  * Contributor(s): Robert Greig.
21  *****************************************************************************/

22 package org.netbeans.lib.cvsclient.response;
23
24 import org.netbeans.lib.cvsclient.event.*;
25 import org.netbeans.lib.cvsclient.util.*;
26
27 /**
28  * Handles the OK response
29  * @author Robert Greig
30  */

31 class OKResponse implements Response {
32
33     /**
34      * Process the data for the response.
35      * @param dis the data inputstream allowing the client to read the server's
36      * response. Note that the actual response name has already been read
37      * and the input stream is positioned just before the first argument, if
38      * any.
39      * @return true if processing should continue, false if processing should
40      * now stop
41      */

42     public void process(LoggedDataInputStream dis, ResponseServices services)
43             throws ResponseException {
44         TerminationEvent termEvent = new TerminationEvent(this, false);
45         services.getEventManager().fireCVSEvent(termEvent);
46     }
47
48     /**
49      * Is this a terminal response, i.e. should reading of responses stop
50      * after this response. This is true for responses such as OK or
51      * an error response
52      */

53     public boolean isTerminalResponse() {
54         return true;
55     }
56 }
Popular Tags