From: Tom E. <tom...@jb...> - 2006-05-21 15:59:15
|
User: telrod Date: 06/05/21 11:59:06 Modified: src/main/org/jboss/remoting ServerInvoker.java Log: JBREM-478 - Reformat code for ServerInvoker.invoke(InvocationRequest) method. Revision Changes Path 1.34 +66 -68 JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java (In the diff below, changes in quantity of whitespace are not shown.) Index: ServerInvoker.java =================================================================== RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -b -r1.33 -r1.34 --- ServerInvoker.java 21 May 2006 15:56:50 -0000 1.33 +++ ServerInvoker.java 21 May 2006 15:59:05 -0000 1.34 @@ -57,7 +57,7 @@ * * @author <a href="mailto:jh...@vo...">Jeff Haynie</a> * @author <a href="mailto:tom...@jb...">Tom Elrod</a> - * @version $Revision: 1.33 $ + * @version $Revision: 1.34 $ */ public abstract class ServerInvoker extends AbstractInvoker implements ServerInvokerMBean { @@ -764,18 +764,16 @@ */ public Object invoke(InvocationRequest invocation) throws Throwable { - if(isStarted()) + if (isStarted()) { Object param = invocation.getParameter(); Object result = null; - - // check to see if this is a is alive ping - if("$PING$".equals(param)) + if ("$PING$".equals(param)) { //if checking lease, need to update lease flag - if(leaseManagement) + if (leaseManagement) { //NOTE we only update the lease when we receive a PING, not for //all invocations @@ -788,9 +786,9 @@ return new InvocationResponse(invocation.getSessionId(), new Boolean(leaseManagement), false, responseMap); } - if("$DISCONNECT$".equals(param)) + if ("$DISCONNECT$".equals(param)) { - if(leaseManagement) + if (leaseManagement) { terminateLease(invocation); } @@ -799,7 +797,7 @@ //TODO: -TME both oneway and internal invocation will be broken since have not // deserialized the para yet (removed ClassUtil.deserialize() so would let handler do it). - if(param instanceof OnewayInvocation) + if (param instanceof OnewayInvocation) { handleOnewayInvocation((OnewayInvocation) param, invocation); } @@ -811,31 +809,31 @@ // too bad we can't optimize this a little better, since we take a lookup hit for // each invocation -JGH ServerInvocationHandler handler = null; - if(subsystem != null) + if (subsystem != null) { handler = (ServerInvocationHandler) handlers.get(subsystem.toUpperCase()); } else { // subsystem not specified, so will hope for a default one being set - if(!handlers.isEmpty()) + if (!handlers.isEmpty()) { handler = (ServerInvocationHandler) handlers.values().iterator().next(); } } - if(param instanceof InternalInvocation) + if (param instanceof InternalInvocation) { result = handleInternalInvocation((InternalInvocation) param, invocation, handler); } else { - if(log.isTraceEnabled()) + if (log.isTraceEnabled()) { log.trace("dispatching invocation: " + invocation + " to subsystem: " + subsystem + " from client: " + clientId); } - if(handler == null) + if (handler == null) { throw new InvalidConfigurationException("Can not handle invocation request because there are no " + "ServerInvocationHandlers registered. Please add via xml configuration " + @@ -843,7 +841,7 @@ } result = handler.invoke(invocation); } - if(log.isTraceEnabled()) + if (log.isTraceEnabled()) { log.trace("dispatch invocation, returning back: " + result + " from subsystem: " + subsystem + " to client: " + clientId); |