Stay organized with collections Save and categorize content based on your preferences.

RemoteDescriptorRegistry

public final class RemoteDescriptorRegistry


A registry for registering remote descriptors. Remote descriptors are registered in the form of a RemoteDescriptor object.

Summary

Public constructors

Public methods

RemoteDescriptor
RemoteDescriptor
argForMsgType(Class<Object> protoMsgType)
RemoteDescriptor

Returns an RemoteDescriptor by its any type url.

static RemoteDescriptorRegistry

Returns a RemoteDescriptorRegistry object

boolean

Checks if an instance type is registered with this registry.

boolean
void

Public constructors

RemoteDescriptorRegistry

public RemoteDescriptorRegistry()

Public methods

argForInstanceType

public RemoteDescriptor argForInstanceType(Class<Object> targetType)
Returns
RemoteDescriptor

an RemoteDescriptor object by its target type.

argForMsgType

public RemoteDescriptor argForMsgType(Class<Object> protoMsgType)
Returns
RemoteDescriptor

an RemoteDescriptor object by its proto message type.

argForRemoteTypeUrl

public RemoteDescriptor argForRemoteTypeUrl(String typeUrl)

Returns an RemoteDescriptor by its any type url. The any type url in this case must match the remote type class, which knows how to convert a class to and from its target type!

Returns
RemoteDescriptor

an RemoteDescriptor object by its remote type url.

getInstance

public static RemoteDescriptorRegistry getInstance()

Returns a RemoteDescriptorRegistry object

Returns
RemoteDescriptorRegistry

an instance of RemoteDescriptorRegistry object.

hasArgForInstanceType

public boolean hasArgForInstanceType(Class<Object> instanceType)

Checks if an instance type is registered with this registry.

Parameters
Class<Object> instanceType

the instance to check

Returns
boolean

true if a RemoteDescriptor is registered for instance type

registerRemoteTypeArgs

public boolean registerRemoteTypeArgs(List<RemoteDescriptor> remoteDescriptors)

unregisterRemoteTypeArgs

public void unregisterRemoteTypeArgs(List<RemoteDescriptor> remoteDescriptors)