1 55 56 package org.apache.bsf.debug.util; 57 58 import java.rmi.RemoteException ; 59 import org.apache.bsf.debug.util.DebugConstants; 60 61 public class Skeleton 62 { 63 64 private static int gUidGenerator=DebugConstants.FIRST_NON_RESERVED_UID; 65 private static Object lock = new Object (); 66 67 int m_tid,m_uid; 68 SocketConnection m_con; 69 70 protected Skeleton(int tid) throws RemoteException { 72 m_tid = tid; 73 m_uid = DebugConstants.UNKNOWN_UID; 74 } 75 protected Skeleton(int tid,int uid) throws RemoteException { 77 m_tid = tid; 78 m_uid = uid; 79 } 80 public boolean equals(Object o) { 82 if (o instanceof Skeleton) 83 return m_uid == ((Skeleton)o).m_uid; 84 else 85 return false; 86 } 87 public void allocOid(SocketConnection con) { 89 synchronized(lock) { 90 m_con = con; 91 if (m_uid==DebugConstants.UNKNOWN_UID) { 92 m_uid = gUidGenerator++; 93 } 94 } 95 } 96 public boolean hasNoUid() { 98 return m_uid==DebugConstants.UNKNOWN_UID; 99 } 100 public int getTid() { return m_tid; } 102 public int getUid() { return m_uid; } 103 104 public void addListener(RemoteServiceListener l) throws RemoteException { 105 throw new Error ("Not to be called on the local service."); 106 } 107 public void removeListener(RemoteServiceListener l) throws RemoteException { 108 throw new Error ("Not to be called on the local service."); 109 } 110 public void createFuture(Object requester) throws RemoteException { 111 throw new Error ("Not to be called on the local service."); 112 } 113 public void suspendFuture(Object requester) throws RemoteException { 114 throw new Error ("Not to be called on the local service."); 115 } 116 public void completeFuture(Object requester) throws RemoteException { 117 throw new Error ("Not to be called on the local service."); 118 } 119 120 } 121 122 | Popular Tags |