@Override
	public final String process(final IoSession session, final String... args) {
		RemoteProgram remoteProgram=null;
		// Get the corresponding RemoteProgram
		try {
			remoteProgram = parseCommandLine(args);
			
			final Class<?> jobClass = (Class<?>) remoteProgram.getAdapterClass();
			final Launcher launcher = Launcher.getLauncher();

			final Launch<?> launch = launcher.newLaunch(jobClass);
			for (IOption ioption:this.getOptions()) {
				ioption.process(launch, remoteProgram);
			}
			
			launch.aSynchLaunch();
			
			return LaunchingMessageKind.ILAUNCH0002.getFormatedMessage(
					jobClass.getCanonicalName(), launch.getLaunchId());
		} catch (ParseException e) {
			return e.getMessage();
		} catch (ParserException e) {
			return e.getFormatedMessage();
		} catch (OptionException e) {
			return e.getFormatedMessage();
		} catch (LaunchException e) {
			return  LaunchingMessageKind.ELAUNCH0008.format(remoteProgram!=null?remoteProgram.getAdapterClass():"unknown",e);
		}
	}
@ Override public final String process ( final IoSession session , final String ... args ) { RemoteProgram remoteProgram = null ; try { remoteProgram = parseCommandLine ( args ) ; final Class < ? > jobClass = ( Class < ? > ) remoteProgram . getAdapterClass ( ) ; final Launcher launcher = Launcher . getLauncher ( ) ; final Launch < ? > launch = launcher . newLaunch ( jobClass ) ; for ( IOption ioption : this . getOptions ( ) ) { ioption . process ( launch , remoteProgram ) ; } launch . aSynchLaunch ( ) ; return LaunchingMessageKind . ILAUNCH0002 . getFormatedMessage ( jobClass . getCanonicalName ( ) , launch . getLaunchId ( ) ) ; } catch ( ParseException e ) { return e . getMessage ( ) ; } catch ( ParserException e ) { return e . getFormatedMessage ( ) ; } catch ( OptionException e ) { return e . getFormatedMessage ( ) ; } catch ( LaunchException e ) { return LaunchingMessageKind . ELAUNCH0008 . format ( remoteProgram != null ? remoteProgram . getAdapterClass ( ) : "unknown" , e ) ; } }
/*
(non-Javadoc)

@see
org.parallelj.launching.transport.tcp.command.AbstractTcpCommand#process
(org.apache.mina.core.session.IoSession, java.lang.String[])