1 22 package org.jboss.mx.server; 23 24 import java.io.ObjectStreamException ; 25 26 import javax.management.ObjectInstance ; 27 import javax.management.ObjectName ; 28 29 35 public class ServerObjectInstance 36 extends ObjectInstance 37 { 38 40 43 String agentID; 44 45 46 48 55 public ServerObjectInstance(ObjectName name, String className, String agentID) 56 { 57 super(name, className); 58 this.agentID = agentID; 59 } 60 61 63 68 String getAgentID() 69 { 70 return agentID; 71 } 72 73 74 76 public boolean equals(Object object) 77 { 78 if (object instanceof ServerObjectInstance) 79 return (super.equals(object) == true 80 && this.agentID.equals(((ServerObjectInstance)object).agentID)); 81 else 82 return super.equals(object); 83 } 84 85 86 88 95 private Object writeReplace() 96 throws ObjectStreamException 97 { 98 return new ObjectInstance (getObjectName(), getClassName()); 99 } 100 101 } 102 | Popular Tags |