/** * Builds error qualifier. * * @param action qualifier action. * @return constructed qualifier string. */ public static String asError(int action) { return asString(ERROR_NAMESPACE, Integer.toString(action)); }
/** * Create a new service info. * * @param serviceName the name of the service * @param methodName the name of the methof * @param parameterizedReturnType the return type (with generics support) * @param communicationMode the directions of the method * @param parameterCount amount of parameters * @param requestType the type of the request */ public MethodInfo( String serviceName, String methodName, Class<?> parameterizedReturnType, CommunicationMode communicationMode, int parameterCount, Class<?> requestType) { this.parameterizedReturnType = parameterizedReturnType; this.communicationMode = communicationMode; this.serviceName = serviceName; this.methodName = methodName; this.qualifier = Qualifier.asString(serviceName, methodName); this.parameterCount = parameterCount; this.requestType = requestType; }
public Builder qualifier(String serviceName, String methodName) { return qualifier(Qualifier.asString(serviceName, methodName)); }
public static String qualifier(Class<?> serviceInterface, Method method) { return Qualifier.asString(serviceName(serviceInterface), methodName(method)); }
public static String qualifier(Class<?> serviceInterface, Method method) { return Qualifier.asString(serviceName(serviceInterface), methodName(method)); }
/** * Constructor for service reference. * * @param serviceMethodDefinition service method info * @param serviceRegistration service registration * @param serviceEndpoint service node info */ public ServiceReference( ServiceMethodDefinition serviceMethodDefinition, ServiceRegistration serviceRegistration, ServiceEndpoint serviceEndpoint) { this.endpointId = serviceEndpoint.id(); this.host = serviceEndpoint.host(); this.port = serviceEndpoint.port(); this.namespace = serviceRegistration.namespace(); this.contentTypes = Collections.unmodifiableSet(serviceEndpoint.contentTypes()); this.tags = mergeTags(serviceMethodDefinition, serviceRegistration, serviceEndpoint); this.action = serviceMethodDefinition.getAction(); this.mode = serviceMethodDefinition.getCommunicationMode(); this.qualifier = Qualifier.asString(namespace, action); this.address = Address.create(this.host(), this.port()); }