|
What this is
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.lib.cvsclient.command.watchers;
import java.io.*;
import org.netbeans.lib.cvsclient.*;
import org.netbeans.lib.cvsclient.command.*;
import org.netbeans.lib.cvsclient.connection.*;
import org.netbeans.lib.cvsclient.event.*;
import org.netbeans.lib.cvsclient.request.*;
/**
* The watchers command looks up who is watching this file,
* who is interested in it.
*
* @author Milos Kleint
* @author Thomas Singer
*/
public class WatchersCommand extends BasicCommand {
/**
* Construct a new watchers command.
*/
public WatchersCommand() {
resetCVSCommand();
}
/**
* Creates and returns the WatchersBuilder.
*
* @param eventMan the event manager used to receive events.
*/
public Builder createBuilder(EventManager eventManager) {
return new WatchersBuilder(eventManager, getLocalDirectory());
}
/**
* Executes this command.
*
* @param client the client services object that provides any necessary
* services to this command, including the ability to actually
* process all the requests
*/
public void execute(ClientServices client, EventManager eventManager)
throws CommandException, AuthenticationException {
client.ensureConnection();
super.execute(client, eventManager);
try {
addRequestForWorkingDirectory(client);
addArgumentRequests();
addRequest(CommandRequest.WATCHERS);
client.processRequests(requests);
}
catch (CommandException ex) {
throw ex;
}
catch (Exception ex) {
throw new CommandException(ex, ex.getLocalizedMessage());
}
finally {
requests.clear();
}
}
/**
* called when server responses with "ok" or "error", (when the command finishes)
*/
public void commandTerminated(TerminationEvent e) {
if (builder != null) {
builder.outputDone();
}
}
/**
* This method returns how the command would looklike when typed on the command line.
* Each command is responsible for constructing this information.
* @returns
|
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.