Package org.prevayler.socketserver.example.server

Examples of org.prevayler.socketserver.example.server.TodoList


  /**
   * @see org.prevayler.socketserver.example.transactions.BeanSetter#lookup(Object)
   */
  protected Object lookup(Object prevalentSystem) throws Exception {
    TodoList todoList = (TodoList) prevalentSystem;
    return todoList.get(id);
  }
View Full Code Here


  /**
   * @see org.prevayler.util.TransactionWithQuery#executeAndQuery(Object, Date)
   */
  public Object executeAndQuery(Object prevalentSystem, Date timestamp) throws Exception {
    TodoList todoList = (TodoList) prevalentSystem;
    Todo todo = todoList.newTodo();
    todo.setDesc(desc);

    // Notify interested clients that the list just changed
    // Note that much more complex notification schemes can be devised
    // than this.
View Full Code Here

* @author djo
*/
public class Main {

  public static synchronized void printList(Object todoList) {
    TodoList theList = (TodoList) todoList;
    Todo[] items = theList.toArray();
    for (int i = 0; i < items.length; i++) {
      System.out.println(items[i].getId() + "\t" + items[i].getDesc());
    }
    System.out.println();
  }
View Full Code Here

TOP

Related Classes of org.prevayler.socketserver.example.server.TodoList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.