use of org.springframework.remoting.support.RemoteInvocation in project spring-framework by spring-projects.
the class SimpleHttpInvokerServiceExporter method handle.
/**
* Reads a remote invocation from the request, executes it,
* and writes the remote invocation result to the response.
* @see #readRemoteInvocation(com.sun.net.httpserver.HttpExchange)
* @see #invokeAndCreateResult(org.springframework.remoting.support.RemoteInvocation, Object)
* @see #writeRemoteInvocationResult(com.sun.net.httpserver.HttpExchange, org.springframework.remoting.support.RemoteInvocationResult)
*/
@Override
public void handle(HttpExchange exchange) throws IOException {
try {
RemoteInvocation invocation = readRemoteInvocation(exchange);
RemoteInvocationResult result = invokeAndCreateResult(invocation, getProxy());
writeRemoteInvocationResult(exchange, result);
exchange.close();
} catch (ClassNotFoundException ex) {
exchange.sendResponseHeaders(500, -1);
logger.error("Class not found during deserialization", ex);
}
}
use of org.springframework.remoting.support.RemoteInvocation in project spring-framework by spring-projects.
the class JmsInvokerServiceExporter method onMessage.
@Override
public void onMessage(Message requestMessage, Session session) throws JMSException {
RemoteInvocation invocation = readRemoteInvocation(requestMessage);
if (invocation != null) {
RemoteInvocationResult result = invokeAndCreateResult(invocation, this.proxy);
writeRemoteInvocationResult(requestMessage, session, result);
}
}
use of org.springframework.remoting.support.RemoteInvocation in project opennms by OpenNMS.
the class ServiceRegistryHttpInvokerProxyFactoryBean method createRemoteInvocation.
@Override
public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
RemoteInvocation retval = super.createRemoteInvocation(methodInvocation);
// Add the interface that is being used to access this service as an invocation attibute
retval.addAttribute(ATTRIBUTE_INTERFACE_NAME, this.getServiceInterface().getName());
return retval;
}
Aggregations