All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lrgs.ldds.CmdGoodbye Maven / Gradle / Ivy

Go to download

A collection of software for aggregatting and processing environmental data such as from NOAA GOES satellites.

The newest version!
/*
*  $Id$
*/

package lrgs.ldds;

import ilex.util.Logger;

/**
This command signals the end of the session.
*/
public class CmdGoodbye extends LddsCommand
{
	/**
	  Executes the command.
	  The server will hangup.
	  @param ldds the server thread object holding connection to client.
	*/
	public int execute(LddsThread ldds)
	{
		Logger.instance().debug1(
			"Executing GOODBYE for " + ldds.getClientName());

		try
		{
			LddsMessage msg = new LddsMessage(LddsMessage.IdGoodbye, "");
			ldds.send(msg);
			Thread.sleep(100); 
		}
		catch (Exception ex) 
		{
		}
		ldds.disconnect();
		return 0;
	}

	public String cmdType()
	{
		return "CmdGoodbye";
	}

	/** @return the code associated with this command. */
	public char getCommandCode() { return LddsMessage.IdGoodbye; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy