public Class<?> getClassById(int classId) { return getClassById(classId, false); }
private Class findClassById(final int interfaceId) { return DefaultClassDictionary.get().getClassById(interfaceId); }
@Override public void onRead(final HandlerContext ctx, final Object msg) throws Exception { Message message = (Message) msg; final Class<?> clazz = DefaultClassDictionary.get().getClassById(message.getInterfaceId()); // TODO: check method access, check object access } }
default ObjectInvoker<?> getInvoker(int classId) { return getInvoker(DefaultClassDictionary.get().getClassById(classId)); }
final Class<?> targetClass = DefaultClassDictionary.get().getClassById(interfaceId); if(targetClass != null) { output.append("interfaceName=");
@Override protected JavaType _typeFromId(final String id, final DatabindContext ctxt) { final TypeFactory typeFactory = ctxt.getTypeFactory(); Class<?> cls = DefaultClassDictionary.get().getClassById(Integer.parseInt(id), true); return typeFactory.constructSpecializedType(_baseType, cls); } }
private String getInvokedClassAndMethodName(Message message) { if (message.getInterfaceId() != 0) { final Class clazz = DefaultClassDictionary.get().getClassById(message.getInterfaceId()); if (clazz != null) { final Method method = DefaultDescriptorFactory.get().getInvoker(clazz).getMethod(message.getMethodId()); return clazz.getSimpleName() + "." + method.getName(); } } return null; }
@Override @SuppressWarnings("unchecked") public <T> Task<StreamSubscriptionHandle<T>> subscribe(final String provider, final int dataClassId, final String streamId, final ClientSideStreamProxy proxy) { logger.debug("Subscribing server side stream proxy."); Class<?> dataClass = DefaultClassDictionary.get().getClassById(dataClassId); AsyncStream<?> stream = stage.getStream(provider, dataClass, streamId); Task<? extends StreamSubscriptionHandle<?>> subscription = stream.subscribe(new AsyncObserver() { @Override public Task<Void> onNext(final Object data, final StreamSequenceToken sequenceToken) { return proxy.onNext(provider, streamId, data); } }, null); await(subscription); final StreamReference.SimpleStreamHandle<T> handle = new StreamReference.SimpleStreamHandle<>(String.valueOf(IdUtils.sequentialLongId())); handleMap.putIfAbsent(handle, new SubscriptionInfo(stream, subscription.join(), proxy)); logger.debug("Successfully subscribed server stream proxy."); return Task.fromValue(handle); }
public ObjectInvoker<?> getInvoker(final int interfaceId) { final ClassDescriptor descriptor = getDescriptor(interfaceId); if (descriptor == null) { return getInvoker(DefaultClassDictionary.get().getClassById(interfaceId)); } if (descriptor.invoker == null) { descriptor.invoker = dynamicReferenceFactory.getInvokerFor(descriptor.factory.getInterface()); } return descriptor.invoker; }
if (message.getInterfaceId() != 0) Class clazz = DefaultClassDictionary.get().getClassById(message.getInterfaceId()); if (clazz != null)
private long getResponseTimeoutMillis(final Message message) { final Class<?> clazz = DefaultClassDictionary.get().getClassById(message.getInterfaceId()); if (clazz != null) { final Method method = DefaultDescriptorFactory.get().getInvoker(clazz).getMethod(message.getMethodId()); final Timeout timeout = timeoutAnnotationCache.getAnnotation(method); if (timeout != null) { return timeout.timeUnit().toMillis(timeout.value()); } } return responseTimeoutMillis; }
final Class classById = DefaultClassDictionary.get().getClassById(classId); final RemoteReference reference = (RemoteReference) DefaultDescriptorFactory.get().getReference( runtime,
public Class<?> getClassById(int classId) { return getClassById(classId, false); }
private Class findClassById(final int interfaceId) { return DefaultClassDictionary.get().getClassById(interfaceId); }
default ObjectInvoker<?> getInvoker(int classId) { return getInvoker(DefaultClassDictionary.get().getClassById(classId)); }
final Class<?> targetClass = DefaultClassDictionary.get().getClassById(interfaceId); if(targetClass != null) { output.append("interfaceName=");
@Override protected JavaType _typeFromId(final String id, final DatabindContext ctxt) { final TypeFactory typeFactory = ctxt.getTypeFactory(); Class<?> cls = DefaultClassDictionary.get().getClassById(Integer.parseInt(id), true); return typeFactory.constructSpecializedType(_baseType, cls); } }
public ObjectInvoker<?> getInvoker(final int interfaceId) { final ClassDescriptor descriptor = getDescriptor(interfaceId); if (descriptor == null) { return getInvoker(DefaultClassDictionary.get().getClassById(interfaceId)); } if (descriptor.invoker == null) { descriptor.invoker = dynamicReferenceFactory.getInvokerFor(descriptor.factory.getInterface()); } return descriptor.invoker; }