http://git-wip-us.apache.org/repos/asf/airavata/blob/785394d3/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java index f5ca3a7..90b5387 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangeRequest.java @@ -1,62 +1,62 @@ -/* - * - * 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.airavata.gfac.core.monitor.state; - -import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest; -import org.apache.airavata.gfac.core.monitor.TaskIdentity; -import org.apache.airavata.model.workspace.experiment.TaskState; - -/** - * This is the primary job state object used in - * through out the monitor module. This use airavata-data-model JobState enum - * Ideally after processing each event or monitoring message from remote system - * Each monitoring implementation has to return this object with a state and - * the monitoring ID - */ -public class TaskStatusChangeRequest extends AbstractStateChangeRequest { - private TaskState state; - private TaskIdentity identity; - // this constructor can be used in Qstat monitor to handle errors - public TaskStatusChangeRequest() { - } - - public TaskStatusChangeRequest(TaskIdentity taskIdentity, TaskState state) { - this.state = state; - setIdentity(taskIdentity); - } - - public TaskState getState() { - return state; - } - - public void setState(TaskState state) { - this.state = state; - } - - public TaskIdentity getIdentity() { - return identity; - } - - public void setIdentity(TaskIdentity identity) { - this.identity = identity; - } - -} +///* +// * +// * 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.airavata.gfac.core.monitor.state; +// +//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest; +//import org.apache.airavata.gfac.core.monitor.TaskIdentity; +//import org.apache.airavata.model.workspace.experiment.TaskState; +// +///** +// * This is the primary job state object used in +// * through out the monitor module. This use airavata-data-model JobState enum +// * Ideally after processing each event or monitoring message from remote system +// * Each monitoring implementation has to return this object with a state and +// * the monitoring ID +// */ +//public class TaskStatusChangeRequest extends AbstractStateChangeRequest { +// private TaskState state; +// private TaskIdentity identity; +// // this constructor can be used in Qstat monitor to handle errors +// public TaskStatusChangeRequest() { +// } +// +// public TaskStatusChangeRequest(TaskIdentity taskIdentity, TaskState state) { +// this.state = state; +// setIdentity(taskIdentity); +// } +// +// public TaskState getState() { +// return state; +// } +// +// public void setState(TaskState state) { +// this.state = state; +// } +// +// public TaskIdentity getIdentity() { +// return identity; +// } +// +// public void setIdentity(TaskIdentity identity) { +// this.identity = identity; +// } +// +//}
http://git-wip-us.apache.org/repos/asf/airavata/blob/785394d3/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java index 327e4d1..6aabe07 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/TaskStatusChangedEvent.java @@ -1,62 +1,62 @@ -/* - * - * 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.airavata.gfac.core.monitor.state; - -import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest; -import org.apache.airavata.gfac.core.monitor.TaskIdentity; -import org.apache.airavata.model.workspace.experiment.TaskState; - -/** - * This is the primary job state object used in - * through out the monitor module. This use airavata-data-model JobState enum - * Ideally after processing each event or monitoring message from remote system - * Each monitoring implementation has to return this object with a state and - * the monitoring ID - */ -public class TaskStatusChangedEvent extends AbstractStateChangeRequest { - private TaskState state; - private TaskIdentity identity; - // this constructor can be used in Qstat monitor to handle errors - public TaskStatusChangedEvent() { - } - - public TaskStatusChangedEvent(TaskIdentity taskIdentity, TaskState state) { - this.state = state; - setIdentity(taskIdentity); - } - - public TaskState getState() { - return state; - } - - public void setState(TaskState state) { - this.state = state; - } - - public TaskIdentity getIdentity() { - return identity; - } - - public void setIdentity(TaskIdentity identity) { - this.identity = identity; - } - -} +///* +// * +// * 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.airavata.gfac.core.monitor.state; +// +//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest; +//import org.apache.airavata.gfac.core.monitor.TaskIdentity; +//import org.apache.airavata.model.workspace.experiment.TaskState; +// +///** +// * This is the primary job state object used in +// * through out the monitor module. This use airavata-data-model JobState enum +// * Ideally after processing each event or monitoring message from remote system +// * Each monitoring implementation has to return this object with a state and +// * the monitoring ID +// */ +//public class TaskStatusChangedEvent extends AbstractStateChangeRequest { +// private TaskState state; +// private TaskIdentity identity; +// // this constructor can be used in Qstat monitor to handle errors +// public TaskStatusChangedEvent() { +// } +// +// public TaskStatusChangedEvent(TaskIdentity taskIdentity, TaskState state) { +// this.state = state; +// setIdentity(taskIdentity); +// } +// +// public TaskState getState() { +// return state; +// } +// +// public void setState(TaskState state) { +// this.state = state; +// } +// +// public TaskIdentity getIdentity() { +// return identity; +// } +// +// public void setIdentity(TaskIdentity identity) { +// this.identity = identity; +// } +// +//} http://git-wip-us.apache.org/repos/asf/airavata/blob/785394d3/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java index 74d4d6a..064338b 100644 --- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java +++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/WorkflowNodeStatusChangedEvent.java @@ -1,64 +1,64 @@ -/* - * - * 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.airavata.gfac.core.monitor.state; - -import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest; -import org.apache.airavata.gfac.core.monitor.WorkflowNodeIdentity; -import org.apache.airavata.model.workspace.experiment.WorkflowNodeState; - -/** - * This is the primary job state object used in - * through out the monitor module. This use airavata-data-model JobState enum - * Ideally after processing each event or monitoring message from remote system - * Each monitoring implementation has to return this object with a state and - * the monitoring ID - */ -public class WorkflowNodeStatusChangedEvent extends AbstractStateChangeRequest { - private WorkflowNodeState state; - private WorkflowNodeIdentity identity; - - // this constructor can be used in Qstat monitor to handle errors - public WorkflowNodeStatusChangedEvent() { - } - - public WorkflowNodeStatusChangedEvent(WorkflowNodeIdentity identity, WorkflowNodeState state) { - this.state = state; - setIdentity(identity); - } - - public WorkflowNodeState getState() { - return state; - } - - public void setState(WorkflowNodeState state) { - this.state = state; - } - - public WorkflowNodeIdentity getIdentity() { - return identity; - } - - public void setIdentity(WorkflowNodeIdentity identity) { - this.identity = identity; - } - - -} +///* +// * +// * 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.airavata.gfac.core.monitor.state; +// +//import org.apache.airavata.common.utils.listener.AbstractStateChangeRequest; +//import org.apache.airavata.gfac.core.monitor.WorkflowNodeIdentity; +//import org.apache.airavata.model.workspace.experiment.WorkflowNodeState; +// +///** +// * This is the primary job state object used in +// * through out the monitor module. This use airavata-data-model JobState enum +// * Ideally after processing each event or monitoring message from remote system +// * Each monitoring implementation has to return this object with a state and +// * the monitoring ID +// */ +//public class WorkflowNodeStatusChangedEvent extends AbstractStateChangeRequest { +// private WorkflowNodeState state; +// private WorkflowNodeIdentity identity; +// +// // this constructor can be used in Qstat monitor to handle errors +// public WorkflowNodeStatusChangedEvent() { +// } +// +// public WorkflowNodeStatusChangedEvent(WorkflowNodeIdentity identity, WorkflowNodeState state) { +// this.state = state; +// setIdentity(identity); +// } +// +// public WorkflowNodeState getState() { +// return state; +// } +// +// public void setState(WorkflowNodeState state) { +// this.state = state; +// } +// +// public WorkflowNodeIdentity getIdentity() { +// return identity; +// } +// +// public void setIdentity(WorkflowNodeIdentity identity) { +// this.identity = identity; +// } +// +// +//} http://git-wip-us.apache.org/repos/asf/airavata/blob/785394d3/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java ---------------------------------------------------------------------- diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java index 8e84ff0..24cfe59 100644 --- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java +++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java @@ -6,8 +6,8 @@ import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent; import org.apache.airavata.model.messaging.event.WorkflowNodeStatusChangeEvent; public interface Publisher { - public void publish(ExperimentStatusChangeEvent event, Metadata metadata); - public void publish(WorkflowNodeStatusChangeEvent event, Metadata metadata); - public void publish(TaskStatusChangeEvent event, Metadata metadata); - public void publish(JobStatusChangeEvent event, Metadata metadata); + public void publish(ExperimentStatusChangeEvent event); + public void publish(WorkflowNodeStatusChangeEvent event); + public void publish(TaskStatusChangeEvent event); + public void publish(JobStatusChangeEvent event); } http://git-wip-us.apache.org/repos/asf/airavata/blob/785394d3/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/AiravataRabbitMQPublisher.java ---------------------------------------------------------------------- diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/AiravataRabbitMQPublisher.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/AiravataRabbitMQPublisher.java new file mode 100644 index 0000000..83e7426 --- /dev/null +++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/AiravataRabbitMQPublisher.java @@ -0,0 +1,46 @@ +/* + * + * 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.airavata.messaging.core.impl; + +import org.apache.airavata.messaging.core.Publisher; +import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent; +import org.apache.airavata.model.messaging.event.JobStatusChangeEvent; +import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent; +import org.apache.airavata.model.messaging.event.WorkflowNodeStatusChangeEvent; + +public class AiravataRabbitMQPublisher implements Publisher { + public void publish(ExperimentStatusChangeEvent event) { + + } + + public void publish(WorkflowNodeStatusChangeEvent event) { + + } + + public void publish(TaskStatusChangeEvent event) { + + } + + public void publish(JobStatusChangeEvent event) { + + } +}
