You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by sc...@apache.org on 2009/04/23 18:12:14 UTC
svn commit: r767955 - in /incubator/etch/branches/name-service: ./ scripts/
services/log/ services/log/src/ services/log/src/main/
services/log/src/main/etch/ services/log/src/main/java/
services/log/src/main/java/org/ services/log/src/main/java/org/ap...
Author: sccomer
Date: Thu Apr 23 16:12:13 2009
New Revision: 767955
URL: http://svn.apache.org/viewvc?rev=767955&view=rev
Log:
fix the name of the name service etch source.
add services to the compile etch files for java script.
idea for log service.
Added:
incubator/etch/branches/name-service/services/log/ (with props)
incubator/etch/branches/name-service/services/log/src/
incubator/etch/branches/name-service/services/log/src/main/
incubator/etch/branches/name-service/services/log/src/main/etch/
incubator/etch/branches/name-service/services/log/src/main/etch/LogService.etch (with props)
incubator/etch/branches/name-service/services/log/src/main/java/
incubator/etch/branches/name-service/services/log/src/main/java/org/
incubator/etch/branches/name-service/services/log/src/main/java/org/apache/
incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/
incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/
incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/
incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceClient.java (with props)
incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceServer.java (with props)
incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceClient.java (with props)
incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceListener.java (with props)
incubator/etch/branches/name-service/services/log/src/test/
incubator/etch/branches/name-service/services/log/src/test/java/
incubator/etch/branches/name-service/services/log/src/test/java/org/
incubator/etch/branches/name-service/services/log/src/test/java/org/apache/
incubator/etch/branches/name-service/services/log/src/test/java/org/apache/etch/
incubator/etch/branches/name-service/services/log/src/test/java/org/apache/etch/services/
incubator/etch/branches/name-service/services/log/src/test/java/org/apache/etch/services/log/
incubator/etch/branches/name-service/services/ns/src/main/etch/NameService.etch
- copied unchanged from r762858, incubator/etch/branches/name-service/services/ns/src/main/etch/ns.etch
Removed:
incubator/etch/branches/name-service/services/ns/src/main/etch/ns.etch
Modified:
incubator/etch/branches/name-service/.classpath
incubator/etch/branches/name-service/scripts/compEtchFilesForJava.bat
Modified: incubator/etch/branches/name-service/.classpath
URL: http://svn.apache.org/viewvc/incubator/etch/branches/name-service/.classpath?rev=767955&r1=767954&r2=767955&view=diff
==============================================================================
--- incubator/etch/branches/name-service/.classpath (original)
+++ incubator/etch/branches/name-service/.classpath Thu Apr 23 16:12:13 2009
@@ -44,6 +44,9 @@
<classpathentry kind="src" path="services/ns/src/main/java"/>
<classpathentry kind="src" path="services/ns/target/generated-sources/main/etch/java"/>
<classpathentry kind="src" path="services/ns/src/test/java"/>
+ <classpathentry kind="src" path="services/log/src/main/java"/>
+ <classpathentry kind="src" path="services/log/src/test/java"/>
+ <classpathentry kind="src" path="services/log/target/generated-sources/main/etch/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/ETCH_DEPENDENT_JARS"/>
<classpathentry kind="output" path="bin"/>
Modified: incubator/etch/branches/name-service/scripts/compEtchFilesForJava.bat
URL: http://svn.apache.org/viewvc/incubator/etch/branches/name-service/scripts/compEtchFilesForJava.bat?rev=767955&r1=767954&r2=767955&view=diff
==============================================================================
--- incubator/etch/branches/name-service/scripts/compEtchFilesForJava.bat (original)
+++ incubator/etch/branches/name-service/scripts/compEtchFilesForJava.bat Thu Apr 23 16:12:13 2009
@@ -24,6 +24,7 @@
@set testsdir=tests\src\main\etch
@set examplesdir=examples
+@set servicesdir=services
@set x=%CD%\
@pushd %testsdir%
@@ -66,3 +67,14 @@
@popd
@popd
+@pushd %servicesdir%
+
+@pushd log\src\main\etch
+@call %x%scripts\etch-eclipse.bat %q% %b% %n% %d% %i% LogService.etch
+@popd
+
+@pushd ns\src\main\etch
+@call %x%scripts\etch-eclipse.bat %q% %b% %n% %d% %i% NameService.etch
+@popd
+
+@popd
Propchange: incubator/etch/branches/name-service/services/log/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Apr 23 16:12:13 2009
@@ -0,0 +1 @@
+target
Added: incubator/etch/branches/name-service/services/log/src/main/etch/LogService.etch
URL: http://svn.apache.org/viewvc/incubator/etch/branches/name-service/services/log/src/main/etch/LogService.etch?rev=767955&view=auto
==============================================================================
--- incubator/etch/branches/name-service/services/log/src/main/etch/LogService.etch (added)
+++ incubator/etch/branches/name-service/services/log/src/main/etch/LogService.etch Thu Apr 23 16:12:13 2009
@@ -0,0 +1,54 @@
+/* $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+module org.apache.etch.services.log
+
+@Timeout( 4000 )
+service LogService
+{
+ boolean canOpenLog( string name )
+
+ @Authorize( canOpenLog, name )
+ void openLog( string name )
+
+ void closeLog()
+
+ boolean isLogOpen()
+
+ @Oneway
+ @Authorize( isLogOpen )
+ void writeLog( string entryId, object[] params )
+
+ @Authorize( isLogOpen )
+ boolean isLogEnabled( string entryId )
+
+ @Authorize( isLogOpen )
+ string[] getLogEnabled()
+
+ @Authorize( isLogOpen )
+ void subscribeLogEnabled()
+
+ @Authorize( isLogOpen )
+ void unsubscribeLogEnabled()
+
+ @Oneway
+ @Direction( Client )
+ void logEnabledChanged( string[] entryIds )
+}
Propchange: incubator/etch/branches/name-service/services/log/src/main/etch/LogService.etch
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/etch/branches/name-service/services/log/src/main/etch/LogService.etch
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceClient.java
URL: http://svn.apache.org/viewvc/incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceClient.java?rev=767955&view=auto
==============================================================================
--- incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceClient.java (added)
+++ incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceClient.java Thu Apr 23 16:12:13 2009
@@ -0,0 +1,49 @@
+/* $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.etch.services.log;
+
+/**
+ * Your custom implementation of BaseLogServiceClient. Add methods here to provide
+ * implementations of messages from the server.
+ */
+public class ImplLogServiceClient extends BaseLogServiceClient
+{
+ /**
+ * Constructs the ImplLogServiceClient.
+ *
+ * @param server a connection to the server session. Use this to send a
+ * message to the server.
+ */
+ public ImplLogServiceClient( RemoteLogServiceServer server )
+ {
+ this.server = server;
+ }
+
+ /**
+ * A connection to the server session. Use this to send a
+ * message to the server.
+ */
+ @SuppressWarnings( "unused" )
+ private final RemoteLogServiceServer server;
+
+ // TODO insert methods here to provide implementations of LogServiceClient
+ // messages from the server.
+}
\ No newline at end of file
Propchange: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceClient.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceServer.java
URL: http://svn.apache.org/viewvc/incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceServer.java?rev=767955&view=auto
==============================================================================
--- incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceServer.java (added)
+++ incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceServer.java Thu Apr 23 16:12:13 2009
@@ -0,0 +1,49 @@
+/* $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.etch.services.log;
+
+/**
+ * Your custom implementation of BaseLogServiceServer. Add methods here to provide
+ * implementations of messages from the client.
+ */
+public class ImplLogServiceServer extends BaseLogServiceServer
+{
+ /**
+ * Constructs the ImplLogServiceServer.
+ *
+ * @param client a connection to the client session. Use this to send a
+ * message to the client.
+ */
+ public ImplLogServiceServer( RemoteLogServiceClient client )
+ {
+ this.client = client;
+ }
+
+ /**
+ * A connection to the client session. Use this to send a
+ * message to the client.
+ */
+ @SuppressWarnings( "unused" )
+ private final RemoteLogServiceClient client;
+
+ // TODO insert methods here to provide implementations of LogServiceServer
+ // messages from the client.
+}
\ No newline at end of file
Propchange: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/ImplLogServiceServer.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceClient.java
URL: http://svn.apache.org/viewvc/incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceClient.java?rev=767955&view=auto
==============================================================================
--- incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceClient.java (added)
+++ incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceClient.java Thu Apr 23 16:12:13 2009
@@ -0,0 +1,57 @@
+/* $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.etch.services.log;
+
+/**
+ * Main program for LogServiceClient. This program makes a connection to the
+ * listener created by MainLogServiceListener.
+ */
+public class MainLogServiceClient implements LogServiceHelper.LogServiceClientFactory
+{
+ /**
+ * Main program for LogServiceClient.
+ *
+ * @param args command line arguments.
+ * @throws Exception
+ */
+ public static void main( String[] args ) throws Exception
+ {
+ // TODO Change to correct URI
+ String uri = "tcp://localhost:4001";
+
+ RemoteLogServiceServer server = LogServiceHelper.newServer( uri, null,
+ new MainLogServiceClient() );
+
+ // Connect to the service
+ server._startAndWaitUp( 4000 );
+
+ // TODO Insert Your Code Here
+
+ // Disconnect from the service
+ server._stopAndWaitDown( 4000 );
+ }
+
+ public LogServiceClient newLogServiceClient( RemoteLogServiceServer server )
+ throws Exception
+ {
+ return new ImplLogServiceClient( server );
+ }
+}
Propchange: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceClient.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceListener.java
URL: http://svn.apache.org/viewvc/incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceListener.java?rev=767955&view=auto
==============================================================================
--- incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceListener.java (added)
+++ incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceListener.java Thu Apr 23 16:12:13 2009
@@ -0,0 +1,54 @@
+/* $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.etch.services.log;
+
+import org.apache.etch.bindings.java.support.ServerFactory;
+import org.apache.etch.util.core.io.Transport;
+
+/**
+ * Main program for LogServiceServer. This program makes a listener to accept
+ * connections from MainLogServiceClient.
+ */
+public class MainLogServiceListener implements LogServiceHelper.LogServiceServerFactory
+{
+ /**
+ * Main program for LogServiceServer.
+ *
+ * @param args command line arguments.
+ * @throws Exception
+ */
+ public static void main( String[] args ) throws Exception
+ {
+ // TODO Change to correct URI
+ String uri = "tcp://0.0.0.0:4001";
+
+ ServerFactory listener = LogServiceHelper.newListener( uri, null,
+ new MainLogServiceListener() );
+
+ // Start the Listener
+ listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
+ }
+
+ public LogServiceServer newLogServiceServer( RemoteLogServiceClient client )
+ {
+ return new ImplLogServiceServer( client );
+ }
+}
Propchange: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/etch/branches/name-service/services/log/src/main/java/org/apache/etch/services/log/MainLogServiceListener.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"