Spring Framework RemoteInvocationResult - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework RemoteInvocationResult class.

This code example shows how to use the following methods:
	 */ 
	protected RemoteInvocation readRemoteInvocation(Message requestMessage) throws JMSException {
		Object content = this.messageConverter.fromMessage(requestMessage);
		if (content instanceof RemoteInvocation) {
			return (RemoteInvocation) content;
		} 
		return onInvalidRequest(requestMessage);
	} 
 
 
	/** 
	 * Send the given RemoteInvocationResult as a JMS message to the originator. 
	 * @param requestMessage current request message 
	 * @param session the JMS Session to use 
	 * @param result the RemoteInvocationResult object 
	 * @throws javax.jms.JMSException if thrown by trying to send the message 
	 */ 
	protected void writeRemoteInvocationResult( 
			Message requestMessage, Session session, RemoteInvocationResult result) throws JMSException {
 
5
CodeRank
This code example shows how to use the following methods:
This code example shows how to use the following methods:recreate
					+ RemoteInvocationResult.class.getCanonicalName() + " but found " 
					+ rawResult.getClass().getCanonicalName(), null); 
		} 
 
		RemoteInvocationResult result = (RemoteInvocationResult) rawResult; 
		return result.recreate(); 
	} 
 
	public AmqpTemplate getAmqpTemplate() { 
		return amqpTemplate; 
	} 
 
	/** 
	 * The AMQP template to be used for sending messages and receiving results. This class is using "Request/Reply" for 
	 * sending messages as described <a href= 
	 * "http://static.springsource.org/spring-amqp/reference/html/amqp.html#request-reply" >in the Spring-AMQP 
	 * documentation</a>. 
	 * 
	 * @param amqpTemplate The amqp template. 
	 */ 
5
CodeRank
This code example shows how to use the following methods:
                Object value = invoke(invocation, proxy);
                return value;
            } 
            catch (Throwable ex)
            { 
                return new RemoteInvocationResult(ex);
            } 
        } 
    } 
 
    public SpringRemoteInvokerComponent() 
    { 
        delegate = new Delegate();
    } 
 
    public void initialise() throws InitialisationException 
    { 
        if (serviceClass == null && serviceBean == null)
        { 
            throw new InitialisationException(CoreMessages.propertiesNotSet("serviceClass or serviceBean"), 
4
CodeRank
This code example shows how to use the following methods:recreate
	 * @return a return value if the invocation result is a successful return 
	 * @throws Throwable if the invocation result is an exception 
	 * @see org.springframework.remoting.support.RemoteInvocationResult#recreate() 
	 */ 
	protected Object recreateRemoteInvocationResult(RemoteInvocationResult result) throws Throwable { 
		return result.recreate(); 
	} 
 
	/** 
	 * Convert the given JMS invoker access exception to an appropriate 
	 * Spring RemoteAccessException. 
	 * @param ex the exception to convert 
	 * @return the RemoteAccessException to throw 
	 */ 
	protected RemoteAccessException convertJmsInvokerAccessException(JMSException ex) { 
		throw new RemoteAccessException("Could not access JMS invoker queue [" + this.queue + "]", ex); 
	} 
 
} 
4
CodeRank
This code example shows how to use the following methods:getException
    protected static List<TraceError> assertTraceError(Operation op, RemoteInvocationResult result) {
        List<TraceError> errors = errorsAnalyzer.locateErrors(creatMockOperationTraceWrapper(op));
        assertEquals("Mismatched number of errors", 1, ListUtil.size(errors));
 
        TraceError err = errors.get(0);
        Throwable exc = result.getException();
        assertEquals("Mismatched error text", StringFormatterUtils.formatStackTrace(exc), err.getMessage());
        return errors;
    } 
 
    protected static ExternalResourceDescriptor assertExternalResource(Operation op) {
        Frame frame = createMockOperationWrapperFrame(op);
        ExternalResourceDescriptor desc = extresAnalyzer.extractExternalResourceDescriptor(frame);
        Boolean directCall = op.get(HttpInvokerRequestExecutorExternalResourceAnalyzer.DIRECT_CALL_ATTR, Boolean.class);
        if ((directCall != null) && directCall.booleanValue()) {
            String label = TEST_HOST + ":" + TEST_PORT;
            assertNotNull("No resource", desc);
            assertSame("Mismatched external resource frame", frame, desc.getFrame());
            assertEquals("Mismatched external resource host", TEST_HOST, desc.getHost());
            assertEquals("Mismatched external resource port", TEST_PORT, desc.getPort());
4
CodeRank
See Code Examples for Spring Framework RemoteInvocationResult Methods: