1 20 21 package fr.dyade.aaa.agent; 22 23 import java.io.*; 24 25 28 public class Role implements Serializable { 29 32 private AgentId listener; 33 34 37 private String name; 38 39 43 public Role(String name) { 44 this.name= name; 45 } 46 47 52 public Role(String name, AgentId listener) { 53 this(name); 54 this.listener = listener; 55 } 56 57 61 public void setListener(AgentId listener) { 62 this.listener = listener; 63 } 64 65 68 public AgentId getListener() { 69 return listener; 70 } 71 72 75 public String getName() { 76 return name; 77 } 78 79 83 public void setName(String name) { 84 this.name = name; 85 } 86 87 public String toString() { 88 StringBuffer output = new StringBuffer (); 89 output.append("("); 90 output.append(super.toString()); 91 output.append(",name=" + name); 92 output.append(",listener=" + listener); 93 output.append(")"); 94 return output.toString(); 95 } 96 } 97 | Popular Tags |