src/main/java/org/cloudi/API.java
public Response send_sync(final String name,
                              final byte[] request_info,
                              final byte[] request,
                              final Integer timeout,
                              final Byte priority)
        throws InvalidInputException,
               MessageDecodingException,
               TerminateException
    {
        try
        {
            OtpOutputStream send_sync = new OtpOutputStream();
            send_sync.write(OtpExternal.versionTag);
            final OtpErlangObject[] tuple = {new OtpErlangAtom("send_sync"),
                                             new OtpErlangString(name),
                                             new OtpErlangBinary(request_info),
                                             new OtpErlangBinary(request),
                                             new OtpErlangUInt(timeout),
                                             new OtpErlangInt(priority)};
            send_sync.write_any(new OtpErlangTuple(tuple));
            send(send_sync);
            return (Response) poll_request(null, false);
        }
        catch (OtpErlangRangeException e)
        {
            e.printStackTrace(API.err);
            return null;
        }
    }
public Response send_sync(final String name,
                              final byte[] request_info,
                              final byte[] request,
                              final Integer timeout,
                              final Byte priority)
        throws InvalidInputException,
               MessageDecodingException,
               TerminateException
    {
        try
        {
            OtpOutputStream send_sync = new OtpOutputStream();
            send_sync.write(OtpExternal.versionTag);
            final OtpErlangObject[] tuple = {new OtpErlangAtom("send_sync"),
                                             new OtpErlangString(name),
                                             new OtpErlangBinary(request_info),
                                             new OtpErlangBinary(request),
                                             new OtpErlangUInt(timeout),
                                             new OtpErlangInt(priority)};
            send_sync.write_any(new OtpErlangTuple(tuple));
            send(send_sync);
            return (Response) poll_request(null, false);
        }
        catch (OtpErlangRangeException e)
        {
            e.printStackTrace(API.err);
            return null;
        }
    }
public Response send_sync ( final String name , final byte [ ] request_info , final byte [ ] request , final Integer timeout , final Byte priority ) throws InvalidInputException , MessageDecodingException , TerminateException { try { OtpOutputStream send_sync = new OtpOutputStream ( ) ; send_sync . write ( OtpExternal . versionTag ) ; final OtpErlangObject [ ] tuple = { new OtpErlangAtom ( "send_sync" ) , new OtpErlangString ( name ) , new OtpErlangBinary ( request_info ) , new OtpErlangBinary ( request ) , new OtpErlangUInt ( timeout ) , new OtpErlangInt ( priority ) } ; send_sync . write_any ( new OtpErlangTuple ( tuple ) ) ; send ( send_sync ) ; return ( Response ) poll_request ( null , false ) ; } catch ( OtpErlangRangeException e ) { e . printStackTrace ( API . err ) ; return null ; } }
Synchronous point-to-point communication to a service
subscribed that matches the destination service <code>name</code>.

@param name          the destination service name
@param request_info  any request metadata
@param request       the request data
@param timeout       the request timeout in milliseconds
@param priority      the request priority

@return              the response
@throws InvalidInputException invalid input to internal function call
@throws MessageDecodingException service messaging failure
@throws TerminateException service execution must terminate
Synchronous point - to - point communication to a service subscribed that matches the destination service <code > name< / code > .