1 package org.objectweb.proactive.examples.components.helloworld; 2 3 import org.objectweb.proactive.ProActive; 4 5 27 28 public class ServerImpl implements Service, ServiceAttributes { 29 30 private String header = ""; 31 32 private int count = 0; 33 34 public void print (final String msg) { 35 System.out.println("print method on server implementation object on node : " + ProActive.getBodyOnThis().getNodeURL()); 36 new Exception () { 37 public String toString () { 38 return "Server: print method called"; 39 } 40 }.printStackTrace(); 41 System.out.println("Server: begin printing..."); 42 for (int i = 0; i < count; ++i) { 43 System.out.println(header + msg); 44 } 45 System.out.println("Server: print done."); 46 } 47 48 public String getHeader () { 49 return header; 50 } 51 52 public void setHeader (final String header) { 53 this.header = header; 54 } 55 56 public int getCount () { 57 return count; 58 } 59 60 public void setCount (final int count) { 61 this.count = count; 62 } 63 } 64 | Popular Tags |