RemoteDescriptorRegistry


class RemoteDescriptorRegistry


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

Summary

Public functions

RemoteDescriptor!
argForInstanceType(targetType: Class<Any!>)
RemoteDescriptor!
argForMsgType(protoMsgType: Class<Any!>)
RemoteDescriptor!

Returns an RemoteDescriptor by its any type url.

java-static RemoteDescriptorRegistry!

Returns a RemoteDescriptorRegistry object

Boolean
hasArgForInstanceType(instanceType: Class<Any!>)

Checks if an instance type is registered with this registry.

Boolean
registerRemoteTypeArgs(
    remoteDescriptors: (Mutable)List<RemoteDescriptor!>
)
Unit
unregisterRemoteTypeArgs(
    remoteDescriptors: (Mutable)List<RemoteDescriptor!>
)

Public functions

argForInstanceType

fun argForInstanceType(targetType: Class<Any!>): RemoteDescriptor!
Returns
RemoteDescriptor!

an RemoteDescriptor object by its target type.

argForMsgType

fun argForMsgType(protoMsgType: Class<Any!>): RemoteDescriptor!
Returns
RemoteDescriptor!

an RemoteDescriptor object by its proto message type.

argForRemoteTypeUrl

fun argForRemoteTypeUrl(typeUrl: String): RemoteDescriptor!

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

java-static fun getInstance(): RemoteDescriptorRegistry!

Returns a RemoteDescriptorRegistry object

Returns
RemoteDescriptorRegistry!

an instance of RemoteDescriptorRegistry object.

hasArgForInstanceType

fun hasArgForInstanceType(instanceType: Class<Any!>): Boolean

Checks if an instance type is registered with this registry.

Parameters
instanceType: Class<Any!>

the instance to check

Returns
Boolean

true if a RemoteDescriptor is registered for instance type

registerRemoteTypeArgs

fun registerRemoteTypeArgs(
    remoteDescriptors: (Mutable)List<RemoteDescriptor!>
): Boolean

unregisterRemoteTypeArgs

fun unregisterRemoteTypeArgs(
    remoteDescriptors: (Mutable)List<RemoteDescriptor!>
): Unit