src/main/java/org/cloudi/API.java
public void return_(final Integer request_type,
                        final String name,
                        final String pattern,
                        final byte[] response_info,
                        final byte[] response,
                        final Integer timeout,
                        final byte[] trans_id,
                        final OtpErlangPid pid)
        throws ReturnAsyncException,
               ReturnSyncException,
               InvalidInputException
    {
        if (request_type == API.ASYNC)
            return_async(name, pattern, response_info, response,
                         timeout, trans_id, pid);
        else if (request_type == API.SYNC)
            return_sync(name, pattern, response_info, response,
                        timeout, trans_id, pid);
        else
            throw new InvalidInputException();
    }
public void return_(final Integer request_type,
                        final String name,
                        final String pattern,
                        final byte[] response_info,
                        final byte[] response,
                        final Integer timeout,
                        final byte[] trans_id,
                        final OtpErlangPid pid)
        throws ReturnAsyncException,
               ReturnSyncException,
               InvalidInputException
    {
        if (request_type == API.ASYNC)
            return_async(name, pattern, response_info, response,
                         timeout, trans_id, pid);
        else if (request_type == API.SYNC)
            return_sync(name, pattern, response_info, response,
                        timeout, trans_id, pid);
        else
            throw new InvalidInputException();
    }
Returns a response from a service request.

@param request_type   constant API.SYNC or API.SYNC
@param name           the service name
@param pattern        the service name pattern
@param response_info  any response metadata
@param response       the response data
@param timeout        the request timeout in milliseconds
@param trans_id       the transaction ID
@param pid            the request's source process ID

@throws ReturnAsyncException async service request returned
@throws ReturnSyncException sync service request returned
@throws InvalidInputException invalid service request type