00001
00004 package cast.examples;
00005
00006 import java.util.Vector;
00007
00008 import Ice.Current;
00009 import Ice.Identity;
00010 import cast.core.CASTComponent;
00011 import cast.examples.autogen.WordServer;
00012 import cast.examples.autogen._WordServerDisp;
00013
00021 public class SimpleAggregateServer extends CASTComponent {
00022
00023 private Vector<Identity> m_serverIdentities = new Vector<Identity>(0);
00024
00025 private class WordServerI extends _WordServerDisp {
00026
00027 private static final long serialVersionUID = 1L;
00028
00029 public String getNewWord(Current __current) {
00030 return "buerhgh";
00031 }
00032
00033 }
00034
00038 public SimpleAggregateServer() {
00039
00040
00041
00042 }
00043
00044 @Override
00045 protected void start() {
00046 WordServerI ws = new WordServerI();
00047 registerIceServer(WordServer.class, ws);
00048 }
00049
00050 public String getNewWord(Current __current) {
00051 return "blah";
00052 }
00053
00054 @Override
00055 public void destroy() {
00056 for (Identity id : m_serverIdentities) {
00057 getObjectAdapter().remove(id);
00058 }
00059 }
00060
00061 }