From: <fc...@us...> - 2008-03-20 15:53:37
|
Revision: 749 http://openutils.svn.sourceforge.net/openutils/?rev=749&view=rev Author: fcarone Date: 2008-03-20 08:53:26 -0700 (Thu, 20 Mar 2008) Log Message: ----------- Initial callback test impl Added Paths: ----------- trunk/openutils-spring-remote-callback/src/test/ trunk/openutils-spring-remote-callback/src/test/java/ trunk/openutils-spring-remote-callback/src/test/java/it/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientCallback.java trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/DummyDataobject.java trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/DummyManagerImpl.java trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/DummyManager.java Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/Client.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,36 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test; + +import it.openutils.spring.remote.callback.test.shared.DummyManager; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class Client +{ + + private DummyManager dummyManager; + + public void clientTest() + { + dummyManager.findAll(); + } + +} Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientCallback.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientCallback.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/ClientCallback.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,53 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test; + +import it.openutils.spring.remote.callback.Callback; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class ClientCallback implements Callback +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(ClientCallback.class); + + /** + * {@inheritDoc} + */ + public String getUID() + { + return "1"; + } + + /** + * {@inheritDoc} + */ + public void invoke() + { + log.info("Callback invoked"); + } + +} Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/DummyDataobject.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/DummyDataobject.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/dataobject/DummyDataobject.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,78 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test.dataobject; + +import java.io.Serializable; + +/** + * @author fcarone + * @version $Id: $ + */ + +public class DummyDataobject implements Serializable +{ + + /** + * + */ + private static final long serialVersionUID = 6428114657758013388L; + + private Long id; + + private String someText; + + + /** + * Returns the id. + * @return the id + */ + public Long getId() + { + return id; + } + + + /** + * Sets the id. + * @param id the id to set + */ + public void setId(Long id) + { + this.id = id; + } + + + /** + * Returns the someText. + * @return the someText + */ + public String getSomeText() + { + return someText; + } + + + /** + * Sets the someText. + * @param someText the someText to set + */ + public void setSomeText(String someText) + { + this.someText = someText; + } + +} Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/DummyManagerImpl.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/DummyManagerImpl.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/server/DummyManagerImpl.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,62 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test.server; + +import it.openutils.spring.remote.callback.manager.CallbackManager; +import it.openutils.spring.remote.callback.test.dataobject.DummyDataobject; +import it.openutils.spring.remote.callback.test.shared.DummyManager; + +import java.util.List; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class DummyManagerImpl implements DummyManager +{ + + private CallbackManager callbackManager; + + /** + * {@inheritDoc} + */ + public List<DummyDataobject> findAll() + { + callbackManager.invokeCallback(); + return null; + } + + /** + * {@inheritDoc} + */ + public DummyDataobject findFilteredFirst(DummyDataobject filter) + { + return null; + } + + + /** + * Sets the callbackManager. + * @param callbackManager the callbackManager to set + */ + public void setCallbackManager(CallbackManager callbackManager) + { + this.callbackManager = callbackManager; + } + +} Added: trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/DummyManager.java =================================================================== --- trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/DummyManager.java (rev 0) +++ trunk/openutils-spring-remote-callback/src/test/java/it/openutils/spring/remote/callback/test/shared/DummyManager.java 2008-03-20 15:53:26 UTC (rev 749) @@ -0,0 +1,35 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package it.openutils.spring.remote.callback.test.shared; + +import it.openutils.spring.remote.callback.test.dataobject.DummyDataobject; + +import java.util.List; + + +/** + * @author fcarone + * @version $Id: $ + */ +public interface DummyManager +{ + + List<DummyDataobject> findAll(); + + DummyDataobject findFilteredFirst(DummyDataobject filter); + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |