package org.tonjac.mini.test; import java.util.Properties; import org.tonjac.mini.*; /* mini * * This program is distributed under the GNU General Public License, version 2. * A copy of this license is included with this source. * * Copyright 2004-2006, Toni Thomsson */ public class TestData implements DataService { public TestData( ) { } public DataServiceReply execute( Session session, Properties args ) throws Exception { DataServiceReply reply = new DataServiceReply(); // Set some session data if( session.getData() == null ) session.setData( new String( "java-session: " + session.getId() ) ); // Set data reply reply.addField( "result", (String)session.getData() ); // Send a message Message msg = new Message(); msg.add( "key", "value" ); msg.send( "testFIFOQueue" ); return reply; } }