All pastes #544998 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-06 17:48 UTC
rendered paste body
		protected class WorkItem
		{	
			private CommandType commandType;
			String command;
			
			public WorkItem(CommandType commandType, String command)
			{
				this.commandType = commandType;
				this.command = command;
			}
			
			/**
			 * Execute the WorkItem
			 *
			 */
			public void exec()
			{
				switch(commandType)
				{
				case CONNECT:
					
					// connection stuff here
					
					break;
				case DISCONNECT:
					
					// disconnect stuff here
					
					break;
				}
			}
		}