Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

Commit cafa510

Browse files
committed
XD-22 refactored dirt to depend on module
1 parent 23bf54a commit cafa510

File tree

17 files changed

+27
-263
lines changed

17 files changed

+27
-263
lines changed

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ project('spring-xd-analytics') {
8282
project('spring-xd-dirt') {
8383
description = 'Spring XD DIRT'
8484
dependencies {
85+
compile project(":spring-xd-module")
8586
compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
8687
compile "org.springframework.integration:spring-integration-event:$springIntegrationVersion"
8788
compile "org.springframework.integration:spring-integration-redis:$springIntegrationVersion"
8889
}
8990
}
9091

9192
project('spring-xd-module') {
92-
description = 'Spring XD Anaytics'
93+
description = 'Spring XD Module'
9394
dependencies {
9495
compile "org.springframework:spring-context:$springVersion"
9596
}

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/core/Module.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/core/Plugin.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/event/AbstractModuleEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.xd.dirt.event;
1818

19-
import org.springframework.xd.dirt.core.Module;
19+
import org.springframework.xd.module.Module;
2020

2121
/**
2222
* @author Mark Fisher

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/event/ModuleDeployedEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.xd.dirt.event;
1818

19-
import org.springframework.xd.dirt.core.Module;
19+
import org.springframework.xd.module.Module;
2020

2121
/**
2222
* @author Mark Fisher

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/event/ModuleUndeployedEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.xd.dirt.event;
1818

19-
import org.springframework.xd.dirt.core.Module;
19+
import org.springframework.xd.module.Module;
2020

2121
/**
2222
* @author Mark Fisher

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/listener/RedisModuleEventListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
import org.springframework.context.ApplicationListener;
2626
import org.springframework.data.redis.connection.RedisConnectionFactory;
2727
import org.springframework.data.redis.core.StringRedisTemplate;
28-
import org.springframework.xd.dirt.core.Module;
2928
import org.springframework.xd.dirt.event.AbstractModuleEvent;
3029
import org.springframework.xd.dirt.event.ModuleDeployedEvent;
3130
import org.springframework.xd.dirt.event.ModuleUndeployedEvent;
31+
import org.springframework.xd.module.Module;
3232

3333
/**
3434
* @author Mark Fisher

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/AbstractModule.java

Lines changed: 0 additions & 54 deletions
This file was deleted.

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/AbstractModuleRegistry.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
package org.springframework.xd.dirt.module;
1818

1919
import org.springframework.core.io.Resource;
20-
import org.springframework.xd.dirt.core.Module;
20+
import org.springframework.xd.module.Module;
21+
import org.springframework.xd.module.SimpleModule;
2122

2223
/**
2324
* @author Mark Fisher

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/ModuleDeployer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
import org.springframework.integration.Message;
3535
import org.springframework.integration.handler.AbstractMessageHandler;
3636
import org.springframework.util.Assert;
37-
import org.springframework.xd.dirt.core.Module;
38-
import org.springframework.xd.dirt.core.Plugin;
3937
import org.springframework.xd.dirt.event.ModuleDeployedEvent;
4038
import org.springframework.xd.dirt.event.ModuleUndeployedEvent;
39+
import org.springframework.xd.module.Module;
40+
import org.springframework.xd.module.Plugin;
4141

4242
/**
4343
* @author Mark Fisher

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/ModuleRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.xd.dirt.module;
1818

19-
import org.springframework.xd.dirt.core.Module;
19+
import org.springframework.xd.module.Module;
2020

2121
/**
2222
* @author Mark Fisher

spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/SimpleModule.java

Lines changed: 0 additions & 117 deletions
This file was deleted.

spring-xd-dirt/src/main/java/tmp/SamplePlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
package tmp;
1818

19-
import org.springframework.xd.dirt.core.Module;
20-
import org.springframework.xd.dirt.core.Plugin;
19+
import org.springframework.xd.module.Module;
20+
import org.springframework.xd.module.Plugin;
2121

2222
public class SamplePlugin implements Plugin {
2323

spring-xd-hadoop/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/*.iml
2+
/bin

spring-xd-module/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin

spring-xd-module/src/main/java/org/springframework/xd/module/AbstractModule.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public abstract class AbstractModule implements Module {
2727
private final String name;
2828

2929
private final String type;
30-
31-
private String instanceId;
30+
31+
private volatile String instanceId;
3232

3333
public AbstractModule(String name, String type) {
3434
Assert.notNull(name, "name must not be null");
@@ -47,18 +47,18 @@ public String getType() {
4747
return this.type;
4848
}
4949

50-
@Override
51-
public String toString() {
52-
return "Module [name=" + name + ", type=" + type + "]";
53-
}
54-
5550
@Override
5651
public String getInstanceId() {
5752
return this.instanceId;
5853
}
59-
54+
6055
public void setInstanceId(String instanceId) {
6156
this.instanceId = instanceId;
6257
}
6358

59+
@Override
60+
public String toString() {
61+
return "Module [name=" + name + ", type=" + type + "]";
62+
}
63+
6464
}

0 commit comments

Comments
 (0)