result = new ClassInfo((short)nextClassId.getAndIncrement(), type); cache.put(type, result);
protected MethodInfo getMethodInfo( Method method ) { MethodInfo mi = methodIndex.get(method); if( mi == null ) { mi = typeInfo.getMethod(method); if( mi == null ) { mi = MethodInfo.NULL_INFO; } methodIndex.put(method, mi); } return mi == MethodInfo.NULL_INFO ? null : mi; }
public ClassInfo( short typeId, Class type ) { this.typeId = typeId; this.name = type.getName(); this.methods = toMethodInfo(type, type.getMethods()); }
@Override public String toString() { return "RemoteObject[#" + objectId + ", " + typeInfo.getName() + "]"; } }
protected void addRemoteObject( byte channel, short objectId, String name, ClassInfo typeInfo ) { if( log.isLoggable(Level.FINEST) ) { log.finest("addRemoveObject(" + objectId + ", " + name + ", " + typeInfo + ")"); } remote.lock.writeLock().lock(); try { Object existing = remote.byName.get(name); if( existing != null ) { throw new RuntimeException("Object already registered for:" + name); } RemoteObjectHandler remoteHandler = new RemoteObjectHandler(this, channel, objectId, typeInfo); Object remoteObject = Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {typeInfo.getType()}, remoteHandler); remote.byName.put(name, remoteObject); remote.byId.put(objectId, remoteObject); } finally { remote.lock.writeLock().unlock(); } }
public ClassInfo( short typeId, Class type ) { this.typeId = typeId; this.name = type.getName(); this.methods = toMethodInfo(type, type.getMethods()); }
@Override public String toString() { return "RemoteObject[#" + objectId + ", " + typeInfo.getName() + "]"; } }
protected void addRemoteObject( byte channel, short objectId, String name, ClassInfo typeInfo ) { if( log.isLoggable(Level.FINEST) ) { log.finest("addRemoveObject(" + objectId + ", " + name + ", " + typeInfo + ")"); } remote.lock.writeLock().lock(); try { Object existing = remote.byName.get(name); if( existing != null ) { throw new RuntimeException("Object already registered for:" + name); } RemoteObjectHandler remoteHandler = new RemoteObjectHandler(this, channel, objectId, typeInfo); Object remoteObject = Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {typeInfo.getType()}, remoteHandler); remote.byName.put(name, remoteObject); remote.byId.put(objectId, remoteObject); } finally { remote.lock.writeLock().unlock(); } }
result = new ClassInfo((short)nextClassId.getAndIncrement(), type); cache.put(type, result);
protected MethodInfo getMethodInfo( Method method ) { MethodInfo mi = methodIndex.get(method); if( mi == null ) { mi = typeInfo.getMethod(method); if( mi == null ) { mi = MethodInfo.NULL_INFO; } methodIndex.put(method, mi); } return mi == MethodInfo.NULL_INFO ? null : mi; }