diff --git a/edexOsgi/build.edex/esb/conf/spring/edex.xml b/edexOsgi/build.edex/esb/conf/spring/edex.xml index 3572d8b877..184cd65e9a 100644 --- a/edexOsgi/build.edex/esb/conf/spring/edex.xml +++ b/edexOsgi/build.edex/esb/conf/spring/edex.xml @@ -301,7 +301,7 @@ - + class="com.raytheon.uf.edex.requestsrv.request.ServerPrivilegedRequestHandler"> - + + value="com.raytheon.uf.edex.requestsrv.request.ServerPrivilegedRequestHandler.ServerPrivilegedRequest" /> - + diff --git a/edexOsgi/com.raytheon.uf.edex.activetable/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.activetable/META-INF/MANIFEST.MF index da8713295b..30d52665a6 100644 --- a/edexOsgi/com.raytheon.uf.edex.activetable/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.activetable/META-INF/MANIFEST.MF @@ -27,5 +27,6 @@ Require-Bundle: com.raytheon.uf.common.localization;bundle-version="1.11.1", com.google.guava;bundle-version="1.0.0", com.raytheon.uf.edex.auth;bundle-version="1.12.1174", com.raytheon.uf.common.serialization.comm, - org.apache.commons.io;bundle-version="2.4.0" + org.apache.commons.io;bundle-version="2.4.0", + com.raytheon.uf.edex.requestsrv;bundle-version="1.14.0" Export-Package: com.raytheon.uf.edex.activetable diff --git a/edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/GetNextEtnUtil.java b/edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/GetNextEtnUtil.java index bfb842f3f7..f3e4930851 100644 --- a/edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/GetNextEtnUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.activetable/src/com/raytheon/uf/edex/activetable/GetNextEtnUtil.java @@ -57,11 +57,11 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.util.StringUtil; -import com.raytheon.uf.edex.auth.RemoteServerRequestRouter; import com.raytheon.uf.edex.database.cluster.ClusterLockUtils; import com.raytheon.uf.edex.database.cluster.ClusterLockUtils.LockState; import com.raytheon.uf.edex.database.cluster.ClusterTask; import com.raytheon.uf.edex.database.cluster.handler.CurrentTimeClusterLockHandler; +import com.raytheon.uf.edex.requestsrv.router.RemoteServerRequestRouter; /** * Library module of functions to support retrieval of next ETN in sequence for diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-thrift-client-route.xml b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-thrift-client-route.xml index b857b3f542..47e8c72fcf 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-thrift-client-route.xml +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-thrift-client-route.xml @@ -3,17 +3,22 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - + - + - - - - - - + + + + + bodyAs(javax.servlet.http.HttpServletRequest) + + + + + diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-thrift-client.xml b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-thrift-client.xml index d59c24bf7e..e96969b820 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-thrift-client.xml +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/res/spring/ebxml-thrift-client.xml @@ -2,18 +2,36 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> - + - - - - - - - - - + + + + + + + + + + + thrift + application/thrift + + + + + + + + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/RegistryRemoteRequestWrapper.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/RegistryRemoteRequestWrapper.java deleted file mode 100644 index 2dc99b9112..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/RegistryRemoteRequestWrapper.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.edex.registry.ebxml; - -import java.io.ByteArrayInputStream; - -import com.raytheon.uf.edex.auth.RemoteRequestRouteWrapper; - -/** - * - * Registry specific wrapper for the remote request router - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- * 5/3/2013     1948        bphillip    Initial implementation
- * 7/26/2013    2232        mpduff      Don't override executeThrift.
- * 10/30/2013   1538        bphillip    Removed unused IRegistryRequestService interface
- * 
- * 
- * - * @author bphillip - * @version 1 - */ -public class RegistryRemoteRequestWrapper extends RemoteRequestRouteWrapper { - - public byte[] request(byte[] data) { - return executeThrift(new ByteArrayInputStream(data)); - } -} diff --git a/tests/.classpath b/tests/.classpath index d95ebd0eb8..deb9fa3a24 100644 --- a/tests/.classpath +++ b/tests/.classpath @@ -91,16 +91,12 @@ - - - - @@ -162,10 +158,12 @@ - + + + diff --git a/tests/unit/com/raytheon/uf/common/serialization/comm/RequestRouterTest.java b/tests/unit/com/raytheon/uf/common/serialization/comm/RequestRouterTest.java index 73ae32073f..70e2a9bc38 100644 --- a/tests/unit/com/raytheon/uf/common/serialization/comm/RequestRouterTest.java +++ b/tests/unit/com/raytheon/uf/common/serialization/comm/RequestRouterTest.java @@ -31,7 +31,7 @@ import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants; import com.raytheon.uf.common.registry.RegistryConstants; import com.raytheon.uf.common.util.DeployTestProperties; import com.raytheon.uf.common.util.registry.RegistryException; -import com.raytheon.uf.edex.auth.RemoteServerRequestRouter; +import com.raytheon.uf.edex.requestsrv.router.RemoteServerRequestRouter; /** * Test {@link RequestRouter}. diff --git a/tests/unit/com/raytheon/uf/edex/auth/req/ServerPrivilegedRequestHandlerTest.java b/tests/unit/com/raytheon/uf/edex/requestsrv/request/ServerPrivilegedRequestHandlerTest.java similarity index 93% rename from tests/unit/com/raytheon/uf/edex/auth/req/ServerPrivilegedRequestHandlerTest.java rename to tests/unit/com/raytheon/uf/edex/requestsrv/request/ServerPrivilegedRequestHandlerTest.java index 30c6a70945..7562d0bbf4 100644 --- a/tests/unit/com/raytheon/uf/edex/auth/req/ServerPrivilegedRequestHandlerTest.java +++ b/tests/unit/com/raytheon/uf/edex/requestsrv/request/ServerPrivilegedRequestHandlerTest.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.edex.auth.req; +package com.raytheon.uf.edex.requestsrv.request; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; @@ -35,9 +35,8 @@ import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest; import com.raytheon.uf.common.localization.msgs.GetServersRequest; import com.raytheon.uf.common.serialization.comm.IRequestHandler; import com.raytheon.uf.common.serialization.comm.IServerRequest; -import com.raytheon.uf.edex.auth.HandlerRegistry; -import com.raytheon.uf.edex.auth.RemoteRequestServer; -import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivilegedRequest; +import com.raytheon.uf.edex.requestsrv.HandlerRegistry; +import com.raytheon.uf.edex.requestsrv.request.ServerPrivilegedRequestHandler.ServerPrivilegedRequest; /** * Test {@link ServerPrivilegedRequestHandler}. @@ -69,8 +68,6 @@ public class ServerPrivilegedRequestHandlerTest { @Before public void setUp() { - RemoteRequestServer.getInstance().setRegistry(registry); - when( registry.getRequestHandler(BandwidthRequest.class .getCanonicalName())).thenReturn(bandwidthHandler); diff --git a/tests/unit/com/raytheon/uf/edex/auth/RemoteServerRequestRouterTest.java b/tests/unit/com/raytheon/uf/edex/requestsrv/router/RemoteServerRequestRouterTest.java similarity index 95% rename from tests/unit/com/raytheon/uf/edex/auth/RemoteServerRequestRouterTest.java rename to tests/unit/com/raytheon/uf/edex/requestsrv/router/RemoteServerRequestRouterTest.java index 4eb7cf5d9d..6b0737028c 100644 --- a/tests/unit/com/raytheon/uf/edex/auth/RemoteServerRequestRouterTest.java +++ b/tests/unit/com/raytheon/uf/edex/requestsrv/router/RemoteServerRequestRouterTest.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.edex.auth; +package com.raytheon.uf.edex.requestsrv.router; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -28,7 +28,7 @@ import com.raytheon.uf.common.comm.CommunicationException; import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest; import com.raytheon.uf.common.localization.msgs.GetServersRequest; import com.raytheon.uf.common.serialization.SerializationUtil; -import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivilegedRequest; +import com.raytheon.uf.edex.requestsrv.request.ServerPrivilegedRequestHandler.ServerPrivilegedRequest; /** * Test {@link RemoteServerRequestRouter}. @@ -47,7 +47,7 @@ import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivil * @version 1.0 */ public class RemoteServerRequestRouterTest { - + private static final BandwidthRequest PRIVILEGED_REQUEST = new BandwidthRequest(); private static final GetServersRequest UNPRIVILEGED_REQUEST = new GetServersRequest(); diff --git a/tests/unit/com/raytheon/uf/edex/auth/ServerRequestRouterTest.java b/tests/unit/com/raytheon/uf/edex/requestsrv/router/ServerRequestRouterTest.java similarity index 91% rename from tests/unit/com/raytheon/uf/edex/auth/ServerRequestRouterTest.java rename to tests/unit/com/raytheon/uf/edex/requestsrv/router/ServerRequestRouterTest.java index 9c981430ed..7f501c74bf 100644 --- a/tests/unit/com/raytheon/uf/edex/auth/ServerRequestRouterTest.java +++ b/tests/unit/com/raytheon/uf/edex/requestsrv/router/ServerRequestRouterTest.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.edex.auth; +package com.raytheon.uf.edex.requestsrv.router; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; @@ -30,8 +30,9 @@ import org.junit.Test; import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest; import com.raytheon.uf.common.localization.msgs.GetServersRequest; import com.raytheon.uf.common.serialization.comm.IRequestHandler; -import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler; -import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivilegedRequest; +import com.raytheon.uf.edex.requestsrv.HandlerRegistry; +import com.raytheon.uf.edex.requestsrv.request.ServerPrivilegedRequestHandler; +import com.raytheon.uf.edex.requestsrv.request.ServerPrivilegedRequestHandler.ServerPrivilegedRequest; /** * Test {@link ServerPrivilegedRequestHandler}. @@ -66,8 +67,6 @@ public class ServerRequestRouterTest { @Before public void setUp() { - RemoteRequestServer.getInstance().setRegistry(registry); - when( registry.getRequestHandler(ServerPrivilegedRequest.class .getCanonicalName())).thenReturn(