KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > core > client > ValidRequestsHandler


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.internal.ccvs.core.client;
12
13
14 import org.eclipse.core.runtime.IProgressMonitor;
15 import org.eclipse.team.internal.ccvs.core.CVSException;
16 import org.eclipse.team.internal.ccvs.core.client.Session;
17
18 /**
19  * Handles a "Valid-requests" response from the CVS server.
20  * <p>
21  * Suppose as a result of performing a command the CVS server responds
22  * as follows:<br>
23  * <pre>
24  * [...]
25  * Valid-requests ci co update Root Directory Valid-responses Argument ...\n
26  * [...]
27  * </pre>
28  * Then we remember the set of valid requests for this session in
29  * preparation for isValidRequests queries.
30  * </p>
31  */

32 class ValidRequestsHandler extends ResponseHandler {
33     public String JavaDoc getResponseID() {
34         return "Valid-requests"; //$NON-NLS-1$
35
}
36
37     public void handle(Session session, String JavaDoc validRequests,
38         IProgressMonitor monitor) throws CVSException {
39         // remember the set of valid requests for this session
40
session.setValidRequests(validRequests);
41     }
42
43 }
44
Popular Tags