You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2013/01/02 20:49:56 UTC
svn commit: r1427978 [2/7] - in
/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src: main/ main/java/
main/java/org/ main/java/org/apache/ main/java/org/apache/uima/
main/java/org/apache/uima/ducc/ main/java/org/apache/uima/ducc/transport/
main/java/...
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,27 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class CancelJobDuccEvent extends AbstractDuccJobEvent {
+
+ public CancelJobDuccEvent() {
+ super(EventType.CANCEL_JOB);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobReplyDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobReplyDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobReplyDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobReplyDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,27 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class CancelJobReplyDuccEvent extends AbstractDuccJobEvent {
+
+ public CancelJobReplyDuccEvent() {
+ super(EventType.JOB_REPLY);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelJobReplyDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,27 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class CancelReservationDuccEvent extends AbstractDuccReservationEvent {
+
+ public CancelReservationDuccEvent() {
+ super(EventType.CANCEL_RESERVATION);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationReplyDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationReplyDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationReplyDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationReplyDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,27 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class CancelReservationReplyDuccEvent extends AbstractDuccReservationEvent {
+
+ public CancelReservationReplyDuccEvent() {
+ super(EventType.RESERVATION_REPLY);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelReservationReplyDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,27 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class CancelServiceDuccEvent extends AbstractDuccJobEvent {
+
+ public CancelServiceDuccEvent() {
+ super(EventType.CANCEL_SERVICE);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceReplyDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceReplyDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceReplyDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceReplyDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,27 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class CancelServiceReplyDuccEvent extends AbstractDuccJobEvent {
+
+ public CancelServiceReplyDuccEvent() {
+ super(EventType.SERVICE_REPLY);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/CancelServiceReplyDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,57 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.io.Serializable;
+
+public interface DuccEvent extends Serializable { // extends Map<Object, Object> {
+ public enum EventType{
+ SUBMIT_JOB,
+ CANCEL_JOB,
+ MODIFY_JOB,
+ JOB_REPLY,
+ SUBMIT_RESERVATION,
+ CANCEL_RESERVATION,
+ MODIFY_RESERVATION,
+ RESERVATION_REPLY,
+ SUBMIT_SERVICE,
+ CANCEL_SERVICE,
+ MODIFY_SERVICE,
+ SERVICE_REPLY,
+ START_PROCESS,
+ STOP_PROCESS,
+ JD_STATE,
+ JM_STATE,
+ ORCHESTRATOR_STATE,
+ RM_STATE,
+ PM_STATE,
+ SM_STATE,
+ PROCESS_STATE,
+ NODE_METRICS,
+ PURGE_PROCESS,
+ SERVICE_REGISTER,
+ SERVICE_UNREGISTER,
+ SERVICE_START,
+ SERVICE_STOP,
+ SERVICE_QUERY,
+ AGENT_PING
+ };
+
+ public EventType getEventType();
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccJobsStateEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccJobsStateEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccJobsStateEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccJobsStateEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,44 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.List;
+
+import org.apache.uima.ducc.transport.event.common.DuccUserReservation;
+import org.apache.uima.ducc.transport.event.common.IDuccJobDeployment;
+
+
+public class DuccJobsStateEvent extends AbstractDuccEvent {
+ private static final long serialVersionUID = 1L;
+ private List<IDuccJobDeployment> jobList;
+ private List<DuccUserReservation> userReservations;
+
+ public DuccJobsStateEvent(EventType eventType, List<IDuccJobDeployment> jobList, List<DuccUserReservation> userReservations) {
+ super(eventType);
+ this.jobList = jobList;
+ this.userReservations = userReservations;
+ }
+ public List<IDuccJobDeployment> getJobList() {
+ return this.jobList;
+ }
+ public List<DuccUserReservation> getUserReservations() {
+ return userReservations;
+ }
+
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/DuccJobsStateEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/JdStateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/JdStateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/JdStateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/JdStateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,40 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.transport.event.jd.DriverStatusReport;
+
+public class JdStateDuccEvent extends AbstractDuccEvent {
+
+ private static final long serialVersionUID = 5344338331069768338L;
+
+ private DriverStatusReport driverStatusReport = null;
+
+ public JdStateDuccEvent() {
+ super(EventType.JD_STATE);
+ }
+
+ public void setState(DriverStatusReport driverStatusReport) {
+ this.driverStatusReport = driverStatusReport;
+ }
+
+ public DriverStatusReport getState() {
+ return this.driverStatusReport;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/JdStateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeInventoryUpdateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeInventoryUpdateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeInventoryUpdateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeInventoryUpdateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,41 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.HashMap;
+
+import org.apache.uima.ducc.common.utils.id.DuccId;
+import org.apache.uima.ducc.transport.event.common.IDuccProcess;
+
+
+public class NodeInventoryUpdateDuccEvent extends AbstractDuccEvent {
+
+ private static final long serialVersionUID = -240986007026771587L;
+
+ private HashMap<DuccId, IDuccProcess> processes = null;
+
+ public NodeInventoryUpdateDuccEvent(HashMap<DuccId, IDuccProcess> processes) {
+ super(EventType.START_PROCESS);
+ this.processes = processes;
+ }
+
+ public HashMap<DuccId, IDuccProcess> getProcesses() {
+ return processes;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeInventoryUpdateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeMetricsUpdateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeMetricsUpdateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeMetricsUpdateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeMetricsUpdateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,75 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+
+import org.apache.uima.ducc.common.Node;
+import org.apache.uima.ducc.common.NodeIdentity;
+import org.apache.uima.ducc.common.agent.metrics.memory.NodeMemory;
+import org.apache.uima.ducc.common.node.metrics.NodeUsersInfo;
+import org.apache.uima.ducc.common.node.metrics.NodeUsersInfo.NodeProcess;
+
+
+public class NodeMetricsUpdateDuccEvent extends AbstractDuccEvent{
+
+ private static final long serialVersionUID = -1066240477810440223L;
+ private Node node;
+ private int processCount=0;
+
+ public NodeMetricsUpdateDuccEvent(Node node, int processCount) {
+ super(EventType.NODE_METRICS);
+ this.node = node;
+ this.processCount = processCount;
+ }
+ public Node getNode() {
+ return node;
+ }
+ public NodeIdentity getNodeIdentity() {
+ return node.getNodeIdentity();
+ }
+ public NodeMemory getNodeMemory() {
+ return node.getNodeMetrics().getNodeMemory();
+ }
+ public TreeMap<String,NodeUsersInfo> getNodeUsersMap() {
+ return node.getNodeMetrics().getNodeUsersMap();
+ }
+ public List<ProcessInfo> getRogueProcessInfoList() {
+ List<ProcessInfo> retVal = new ArrayList<ProcessInfo>();
+ TreeMap<String,NodeUsersInfo> nodeUsersMap = getNodeUsersMap();
+ if(nodeUsersMap != null) {
+ for(Entry<String, NodeUsersInfo> entry : nodeUsersMap.entrySet()) {
+ NodeUsersInfo nodeUsersInfo = entry.getValue();
+ String uid = nodeUsersInfo.getUid();
+ List<NodeProcess> rogueList = nodeUsersInfo.getRogueProcesses();
+ for( NodeProcess rogue : rogueList ) {
+ ProcessInfo processInfo = new ProcessInfo(uid,rogue.getPid(), rogue.isJava());
+ retVal.add(processInfo);
+ }
+ }
+ }
+ return retVal;
+ }
+ public int getProcessCount() {
+ return processCount;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/NodeMetricsUpdateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorAbbreviatedStateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorAbbreviatedStateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorAbbreviatedStateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorAbbreviatedStateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,60 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.Iterator;
+
+import org.apache.uima.ducc.common.utils.id.DuccId;
+import org.apache.uima.ducc.transport.event.common.DuccWorkMap;
+import org.apache.uima.ducc.transport.event.common.IDuccWork;
+import org.apache.uima.ducc.transport.event.common.IDuccWorkJob;
+
+
+public class OrchestratorAbbreviatedStateDuccEvent extends AbstractDuccEvent {
+
+ private static final long serialVersionUID = 3637372507135841728L;
+
+ private DuccWorkMap workMap;
+
+ public OrchestratorAbbreviatedStateDuccEvent() {
+ super(EventType.ORCHESTRATOR_STATE);
+ }
+
+ private void abbreviate() {
+ if(workMap != null) {
+ Iterator<DuccId> jobKeys = workMap.getJobKeySet().iterator();
+ while(jobKeys.hasNext()) {
+ DuccId jobKey = jobKeys.next();
+ IDuccWork duccWork = workMap.findDuccWork(jobKey);
+ IDuccWorkJob job = (IDuccWorkJob)duccWork;
+ job.setCommandLine(null);
+ job.getDriver().setCommandLine(null);
+ }
+ }
+ }
+
+ public void setWorkMap(DuccWorkMap workMap) {
+ this.workMap = workMap;
+ abbreviate();
+ }
+
+ public DuccWorkMap getWorkMap() {
+ return this.workMap;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorAbbreviatedStateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,40 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.transport.event.common.DuccWorkMap;
+
+public class OrchestratorStateDuccEvent extends AbstractDuccEvent {
+
+ private static final long serialVersionUID = 3637372507135841728L;
+
+ private DuccWorkMap workMap;
+
+ public OrchestratorStateDuccEvent() {
+ super(EventType.ORCHESTRATOR_STATE);
+ }
+
+ public void setWorkMap(DuccWorkMap workMap) {
+ this.workMap = workMap;
+ }
+
+ public DuccWorkMap getWorkMap() {
+ return this.workMap;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/PmStateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/PmStateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/PmStateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/PmStateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,28 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+public class PmStateDuccEvent extends AbstractDuccEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ public PmStateDuccEvent() {
+ super(EventType.PM_STATE);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/PmStateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessInfo.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessInfo.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessInfo.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessInfo.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,44 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+public class ProcessInfo {
+
+ private String uid = null;
+ private String pid = null;
+ private boolean isJava;
+
+ public ProcessInfo(String uid, String pid, boolean isJava) {
+ this.uid = uid;
+ this.pid = pid;
+ this.isJava = isJava;
+ }
+
+ public String getUid() {
+ return this.uid;
+ }
+
+ public String getPid() {
+ return this.pid;
+ }
+
+ public boolean isJava() {
+ return isJava;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessMetricsUpdateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessMetricsUpdateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessMetricsUpdateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessMetricsUpdateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,38 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.common.agent.metrics.memory.ProcessResidentMemory;
+
+public class ProcessMetricsUpdateDuccEvent extends AbstractDuccEvent{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4368013602512457526L;
+ private ProcessResidentMemory residentMemory;
+
+ public ProcessMetricsUpdateDuccEvent(ProcessResidentMemory residentMemory) {
+ super(EventType.NODE_METRICS);
+ this.residentMemory = residentMemory;
+ }
+ public ProcessResidentMemory getResidentMemory() {
+ return residentMemory;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessMetricsUpdateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessPurgeDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessPurgeDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessPurgeDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessPurgeDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,35 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.transport.event.common.IDuccProcess;
+
+public class ProcessPurgeDuccEvent extends AbstractDuccEvent {
+
+ private static final long serialVersionUID = -3546458945041151441L;
+ private IDuccProcess process2purge;
+
+ public ProcessPurgeDuccEvent(IDuccProcess process2purge) {
+ super(EventType.PURGE_PROCESS);
+ this.process2purge = process2purge;
+ }
+ public IDuccProcess getProcess() {
+ return process2purge;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessPurgeDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStartDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStartDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStartDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStartDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,58 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.Map;
+
+import org.apache.uima.ducc.common.utils.id.DuccId;
+import org.apache.uima.ducc.transport.cmdline.ICommandLine;
+import org.apache.uima.ducc.transport.event.common.IDuccProcess;
+import org.apache.uima.ducc.transport.event.common.IDuccStandardInfo;
+
+
+public class ProcessStartDuccEvent extends AbstractDuccEvent {
+ private static final long serialVersionUID = 4366171169403416863L;
+ private Map<DuccId,IDuccProcess> processMap;
+ private ICommandLine commandLine;
+// private String user;
+// private String workingDirectory;
+ private DuccId duccId;
+ private IDuccStandardInfo info;
+
+ public ProcessStartDuccEvent(Map<DuccId,IDuccProcess> processMap, ICommandLine commandLine,DuccId duccId, IDuccStandardInfo info) {
+ super(EventType.START_PROCESS);
+ this.processMap = processMap;
+ this.commandLine = commandLine;
+// this.user = user;
+ this.duccId = duccId;
+ this.info = info;
+ }
+ public Map<DuccId,IDuccProcess> getProcessMap() {
+ return processMap;
+ }
+ public ICommandLine getCommandLine() {
+ return commandLine;
+ }
+ public IDuccStandardInfo getStandardInfo() {
+ return info;
+ }
+ public DuccId getDuccWorkId() {
+ return duccId;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStartDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStateUpdateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStateUpdateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStateUpdateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStateUpdateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,69 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.List;
+
+import org.apache.uima.ducc.transport.agent.IUimaPipelineAEComponent;
+import org.apache.uima.ducc.transport.agent.ProcessStateUpdate;
+import org.apache.uima.ducc.transport.event.common.IProcessState.ProcessState;
+
+
+public class ProcessStateUpdateDuccEvent extends AbstractDuccEvent {
+ private static final long serialVersionUID = -9138045039215135857L;
+ private ProcessStateUpdate processUpdate;
+
+ public ProcessStateUpdateDuccEvent(ProcessStateUpdate processUpdate) {
+ super(EventType.PROCESS_STATE);
+ this.processUpdate = processUpdate;
+ }
+ /**
+ * @return the state
+ */
+ public ProcessState getState() {
+ return processUpdate.getState();
+ }
+ /**
+ * @return the pid
+ */
+ public String getPid() {
+ return processUpdate.getPid();
+ }
+ /**
+ * @param pid the pid to set
+ */
+ /**
+ * @return the duccProcessId
+ */
+ public String getDuccProcessId() {
+ return processUpdate.getDuccProcessId();
+ }
+ /**
+ * @param duccProcessId the duccProcessId to set
+ */
+ public List<IUimaPipelineAEComponent> getUimaPipeline() {
+ return processUpdate.getUimaPipeline();
+ }
+ public String getProcessJmxUrl() {
+ return processUpdate.getProcessJmxUrl();
+ }
+ public String getServiceEdnpoint() {
+ return processUpdate.getSocketEndpoint();
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStateUpdateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStopDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStopDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStopDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStopDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,40 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.Map;
+
+import org.apache.uima.ducc.common.utils.id.DuccId;
+import org.apache.uima.ducc.transport.event.common.IDuccProcess;
+
+
+
+public class ProcessStopDuccEvent extends AbstractDuccEvent {
+
+ private static final long serialVersionUID = 7687131475658602390L;
+ private Map<DuccId,IDuccProcess> processMap;
+
+ public ProcessStopDuccEvent(Map<DuccId,IDuccProcess> processMap) {
+ super(EventType.STOP_PROCESS);
+ this.processMap = processMap;
+ }
+ public Map<DuccId,IDuccProcess> getProcessMap() {
+ return processMap;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ProcessStopDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,162 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Map;
+
+import org.apache.uima.ducc.common.utils.id.DuccId;
+import org.apache.uima.ducc.transport.event.rm.IResource;
+import org.apache.uima.ducc.transport.event.rm.IRmJobState;
+import org.apache.uima.ducc.transport.event.rm.IRmStateEvent;
+
+
+
+public class RmStateDuccEvent
+ extends AbstractDuccEvent
+ implements IRmStateEvent
+{
+
+ private static final long serialVersionUID = -5878153925779939796L;
+
+ Map<DuccId, IRmJobState> rmJobState;
+
+ public RmStateDuccEvent() {
+ super(EventType.RM_STATE);
+ }
+
+ public RmStateDuccEvent(Map<DuccId, IRmJobState> rmJobState) {
+ super(EventType.RM_STATE);
+ this.rmJobState = rmJobState;
+ }
+
+ public Map<DuccId, IRmJobState> getJobState()
+ {
+ return rmJobState;
+ }
+
+ public String toString()
+ {
+ // Walk the rmJobStateMap
+ // Each entry has state for one job. Job == job or reservation.
+ // Each job has map of current resources, pending removals, and pending additions.
+
+ // For each job, print the stable resources, pending removals, and pending additions.
+
+ // Each resource has a DuccId which is the share ID that RM assigns, and the
+ // NodeIdentity corresponding to that share.
+ StringBuffer buf = new StringBuffer();
+
+ ArrayList<IRmJobState> jobs = new ArrayList<IRmJobState>();
+ jobs.addAll(rmJobState.values());
+ Collections.sort(jobs, new JobByIdSorter());
+
+ buf.append(String.format("\n%6s %8s %9s %8s %s\n", "Id", "Existing", "Additions", "Removals", "Refusal"));
+ for ( IRmJobState j : jobs ) {
+ String st = "?";
+ switch ( j.getDuccType() ) {
+ case Reservation:
+ st = "R";
+ break;
+ case Job:
+ st = "J";
+ break;
+ case Service:
+ st = "S";
+ break;
+ }
+ buf.append(String.format("%1s%d %8d %9d %8d %s\n",
+ st,
+ j.getId().getFriendly(),
+ (j.getResources() == null ? 0 : j.getResources().size()),
+ (j.getPendingAdditions() == null ? 0 : j.getPendingAdditions().size()),
+ (j.getPendingRemovals() == null ? 0 : j.getPendingRemovals().size()),
+ (j.isRefused() ? j.getReason() : "N/A")));
+ }
+
+ for ( IRmJobState j : jobs ) {
+ int counter = 0;
+ buf.append(String.format("%s %s\n Existing: ", j.getDuccType(), j.getId().getFriendly()));
+ Map<DuccId, IResource> existing = j.getResources();
+ if ( existing == null ) {
+ buf.append("<none>\n");
+ } else {
+ for ( IResource r : existing.values() ) {
+ if ((counter++ % 10) == 0 ) {
+ buf.append("\n ");
+ }
+
+ buf.append(r.toString());
+ buf.append(" ");
+ }
+ buf.append("\n");
+ }
+
+ counter = 0;
+ buf.append(String.format("%s %s\n\tAdditions: ", j.getDuccType(), j.getId().getFriendly()));
+ Map<DuccId, IResource> additions = j.getPendingAdditions();
+ if ( additions == null ) {
+ buf.append("<none>\n");
+ } else {
+
+ for ( IResource r : additions.values() ) {
+ if ((counter++ % 10) == 0 ) {
+ buf.append("\n ");
+ }
+ buf.append(r.toString());
+ buf.append(" ");
+ }
+ buf.append("\n");
+ }
+
+ counter = 0;
+ buf.append(String.format("%s %s\n\tRemovals: ", j.getDuccType(), j.getId().getFriendly()));
+ Map<DuccId, IResource> removals = j.getPendingRemovals();
+ if ( removals == null ) {
+ buf.append("<none>\n");
+ } else {
+
+ for ( IResource r : removals.values() ) {
+ if ((counter++ % 10) == 0 ) {
+ buf.append("\n ");
+ }
+ buf.append(r.toString());
+ buf.append(" ");
+ }
+ buf.append("\n");
+ }
+ }
+
+ return buf.toString();
+ }
+ //
+ // Order classes by share weight, descending
+ //
+ static private class JobByIdSorter
+ implements Comparator<IRmJobState>
+ {
+ public int compare(IRmJobState j1, IRmJobState j2)
+ {
+ return ( (int) (j1.getId().getFriendly() - j2.getId().getFriendly()) );
+ }
+ }
+
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceModifyEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceModifyEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceModifyEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceModifyEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,97 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.transport.event.sm.IService;
+
+@SuppressWarnings("serial")
+public class ServiceModifyEvent
+ extends AServiceRequest
+ implements IService
+{
+ private long friendly; // the "friendly" part of a DuccId
+ private String epname;
+ private String user;
+ private int instances; // 0 ==> don't modify instances
+ private Trinary autostart;
+ private boolean activate;
+
+ public ServiceModifyEvent(String user, long friendly, String epname)
+ {
+ super(EventType.SERVICE_STOP);
+ this.friendly = friendly;
+ this.epname = epname;
+ this.user = user;
+ this.instances = 0;
+ this.autostart = Trinary.Unset;
+ this.activate = false;
+ }
+
+ public void setInstances(int instances) {
+ this.instances = instances;
+ }
+
+ public int getInstances() {
+ return instances;
+ }
+
+ public void setAutostart(Trinary autostart) {
+ this.autostart = autostart;
+ }
+
+ public Trinary getAutostart() {
+ return autostart;
+ }
+
+ public void setActivate(boolean activate)
+ {
+ this.activate = activate;
+ }
+
+ public boolean getActivate()
+ {
+ return activate;
+ }
+
+ public long getFriendly() {
+ return friendly;
+ }
+
+ public void setFriendly(long friendly) {
+ this.friendly = friendly;
+ }
+
+ public String getEndpoint()
+ {
+ return epname;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ @Override
+ public String toString() {
+ return "ServiceModifyEvent [friendly=" + friendly + ", user=" + user + ", instances=" + instances
+ + ", autostart=" + autostart + ", activate=" + activate
+ + "]";
+ }
+
+
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceModifyEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,49 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class ServiceQueryEvent
+ extends AServiceRequest
+{
+ String user;
+ long friendly;
+ String epname;
+
+ public ServiceQueryEvent(String user, long friendly, String epname)
+ {
+ super(EventType.SERVICE_QUERY);
+ this.user = user;
+ this.friendly = friendly;
+ this.epname = epname;
+ }
+
+ public long getFriendly() {
+ return friendly;
+ }
+
+ public String getEndpoint() {
+ return epname;
+ }
+
+ public String getUser()
+ {
+ return user;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryReplyEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryReplyEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryReplyEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryReplyEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,61 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.ArrayList;
+
+import org.apache.uima.ducc.transport.event.sm.IServiceDescription;
+
+
+@SuppressWarnings("serial")
+public class ServiceQueryReplyEvent
+ extends ServiceReplyEvent
+{
+ // same as a ServiceReply Event plus it has a collection of info about services.
+
+ ArrayList<IServiceDescription> services = new ArrayList<IServiceDescription>();
+ public ServiceQueryReplyEvent()
+ {
+ super(ServiceCode.OK, "Query Reply", "No Endpoint", null);
+ }
+
+ public void addService(IServiceDescription s)
+ {
+ this.services.add(s);
+ }
+
+ public ArrayList<IServiceDescription> getServices()
+ {
+ return services;
+ }
+
+ public String toString()
+ {
+ StringBuilder sb = new StringBuilder();
+ if ( services.size() == 0 ) {
+ return "No Services";
+ } else {
+ for ( IServiceDescription sd : services ) {
+ sb.append(sd.toString());
+ sb.append("\n");
+ }
+ }
+ return sb.toString();
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceQueryReplyEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceRegisterEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceRegisterEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceRegisterEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceRegisterEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,69 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.common.utils.DuccProperties;
+
+@SuppressWarnings("serial")
+public class ServiceRegisterEvent
+ extends AServiceRequest
+{
+
+ private int ninstances;
+ private String endpoint;
+ private String user;
+ private DuccProperties descriptor;
+
+ public ServiceRegisterEvent(String user, int ninstances, String endpoint, DuccProperties descriptor)
+ {
+ super(EventType.SERVICE_REGISTER);
+ this.user = user;
+ this.ninstances = ninstances;
+ this.endpoint = endpoint;
+ this.descriptor = descriptor;
+ }
+
+ public int getNinstances() {
+ return ninstances;
+ }
+
+
+ public String getEndpoint() {
+ return endpoint;
+ }
+
+
+ public String getUser() {
+ return user;
+ }
+
+
+ public DuccProperties getDescriptor() {
+ return descriptor;
+ }
+
+
+ @Override
+ public String toString() {
+ return "ServiceRegisterEvent [ninstances=" + ninstances + ", endpoint="
+ + endpoint + ", user=" + user + ", service_descriptor="
+ + descriptor + "]";
+ }
+
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceRegisterEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceReplyEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceReplyEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceReplyEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceReplyEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,82 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.common.utils.id.DuccId;
+import org.apache.uima.ducc.transport.event.sm.IService;
+
+
+@SuppressWarnings("serial")
+public class ServiceReplyEvent
+ extends AbstractDuccEvent
+ implements IService
+{
+ private ServiceCode return_code;
+ private String message = "N/A";
+ private String endpoint;
+ private DuccId id;
+
+ public ServiceReplyEvent(ServiceCode rc, String message, String endpoint, DuccId id)
+ {
+ super(EventType.SERVICE_REPLY);
+ this.return_code = rc;
+ this.message = message;
+ this.endpoint = endpoint;
+ this.id = id;
+ }
+
+ public ServiceCode getReturnCode() {
+ return return_code;
+ }
+
+ public void setReturn_code(ServiceCode return_code) {
+ this.return_code = return_code;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public String getEndpoint() {
+ return endpoint;
+ }
+
+ public void setEndpoint(String endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ public DuccId getId() {
+ return id;
+ }
+
+ public void setId(DuccId id) {
+ this.id = id;
+ }
+
+ @Override
+ public String toString() {
+ return "ServiceReplyEvent [return_code=" + return_code + ", message="
+ + message + ", endpoint=" + endpoint + ", id=" + id + "]";
+ }
+
+ }
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceReplyEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStartEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStartEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStartEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStartEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,76 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class ServiceStartEvent
+ extends AServiceRequest
+{
+ private int friendly;
+ private String epname;
+ private int instances;
+ private boolean update;
+ private String user;
+
+ public ServiceStartEvent(String user, int friendly, String epname)
+ {
+ super(EventType.SERVICE_START);
+ this.user = user;
+ this.friendly = friendly;
+ this.epname = epname;
+ }
+
+ public int getFriendly() {
+ return friendly;
+ }
+
+ public String getEndpoint()
+ {
+ return epname;
+ }
+
+ public int getInstances() {
+ return instances;
+ }
+
+ public void setInstances(int instances)
+ {
+ this.instances = instances;
+ }
+
+ public boolean getUpdate()
+ {
+ return update;
+ }
+
+ public void setUpdate(boolean update)
+ {
+ this.update = update;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public String toString() {
+ return "ServiceStartEvent [friendly=" + friendly + ", user=" + user + ", instances=" + instances + ", update=" + update
+ + "]";
+ }
+
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStartEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStopEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStopEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStopEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStopEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,80 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.transport.event.sm.IService;
+
+@SuppressWarnings("serial")
+public class ServiceStopEvent
+ extends AServiceRequest
+ implements IService
+{
+ private long friendly;
+ private String epname;
+ private String user;
+ private int instances;
+ private boolean update;
+
+ public ServiceStopEvent(String user, long friendly, String epname)
+ {
+ super(EventType.SERVICE_STOP);
+ this.friendly = friendly;
+ this.epname = epname;
+ this.user = user;
+ }
+
+ public long getFriendly() {
+ return friendly;
+ }
+
+ public String getEndpoint()
+ {
+ return epname;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public int getInstances() {
+ return instances;
+ }
+
+ public void setInstances(int instances)
+ {
+ this.instances = instances;
+ }
+
+ public boolean getUpdate()
+ {
+ return update;
+ }
+
+ public void setUpdate(boolean update)
+ {
+ this.update = update;
+ }
+
+ @Override
+ public String toString() {
+ return "ServiceStopEvent [friendly=" + friendly + ", user=" + user + ", instances=" + instances + ", update=" + update
+ + "]";
+ }
+
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceStopEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceUnregisterEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceUnregisterEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceUnregisterEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceUnregisterEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,60 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.transport.event.sm.IService;
+
+@SuppressWarnings("serial")
+public class ServiceUnregisterEvent
+ extends AServiceRequest
+ implements IService
+{
+
+ private long friendly;
+ private String epname;
+ private String user;
+
+ public ServiceUnregisterEvent(String user, long friendly, String epname)
+ {
+ super(EventType.SERVICE_UNREGISTER);
+ this.friendly = friendly;
+ this.epname = epname;
+ this.user = user;
+ }
+
+ public long getFriendly() {
+ return friendly;
+ }
+
+ public String getEndpoint()
+ {
+ return epname;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ @Override
+ public String toString() {
+ return "ServiceUnregisterEvent [friendly=" + friendly + ", user="
+ + user + "]";
+ }
+
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/ServiceUnregisterEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SmStateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SmStateDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SmStateDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SmStateDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,40 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import org.apache.uima.ducc.transport.event.sm.ServiceMap;
+
+public class SmStateDuccEvent extends AbstractDuccEvent {
+
+ private static final long serialVersionUID = 3637372507135841728L;
+
+ private ServiceMap serviceMap;
+
+ public SmStateDuccEvent() {
+ super(EventType.SM_STATE);
+ }
+
+ public void setServiceMap(ServiceMap serviceMap) {
+ this.serviceMap = serviceMap;
+ }
+
+ public ServiceMap getServiceMap() {
+ return this.serviceMap;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SmStateDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/StartProcessDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/StartProcessDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/StartProcessDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/StartProcessDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,43 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.uima.ducc.common.utils.id.DuccId;
+
+
+public class StartProcessDuccEvent extends AbstractDuccEvent {
+ private static final long serialVersionUID = 682197216516923063L;
+ private Map<DuccId,Process> processMap;
+ private Properties processSpecification;
+
+ public StartProcessDuccEvent(Map<DuccId,Process> processMap, Properties processSpecification) {
+ super(EventType.START_PROCESS);
+ this.processMap = processMap;
+ this.processSpecification = processSpecification;
+ }
+ public Map<DuccId,Process> getProcessMap() {
+ return processMap;
+ }
+ public Properties getProcessSpecification() {
+ return processSpecification;
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/StartProcessDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,27 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class SubmitJobDuccEvent extends AbstractDuccJobEvent {
+
+ public SubmitJobDuccEvent() {
+ super(EventType.SUBMIT_JOB);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobReplyDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobReplyDuccEvent.java?rev=1427978&view=auto
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobReplyDuccEvent.java (added)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobReplyDuccEvent.java Wed Jan 2 19:49:53 2013
@@ -0,0 +1,27 @@
+/*
+ * 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.uima.ducc.transport.event;
+
+@SuppressWarnings("serial")
+public class SubmitJobReplyDuccEvent extends AbstractDuccJobEvent {
+
+ public SubmitJobReplyDuccEvent() {
+ super(EventType.JOB_REPLY);
+ }
+}
Propchange: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/SubmitJobReplyDuccEvent.java
------------------------------------------------------------------------------
svn:eol-style = native