-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
44 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package dev.shiza.dew.event; | ||
|
||
import dev.shiza.dew.result.ResultHandlerFacade; | ||
import dev.shiza.dew.result.ResultHandlerFacadeFactory; | ||
import dev.shiza.dew.subscription.SubscriptionFacade; | ||
import dev.shiza.dew.subscription.SubscriptionFacadeFactory; | ||
|
||
public final class EventBusFactory { | ||
|
||
private EventBusFactory() {} | ||
|
||
public static EventBus create( | ||
final SubscriptionFacade subscriptionFacade, final ResultHandlerFacade resultHandlerFacade) { | ||
return new EventBusImpl(subscriptionFacade, resultHandlerFacade); | ||
} | ||
|
||
public static EventBus create() { | ||
return create(SubscriptionFacadeFactory.create(), ResultHandlerFacadeFactory.create()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
dew-common/src/dev/shiza/dew/result/ResultHandlerFacadeFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package dev.shiza.dew.result; | ||
|
||
import java.util.HashMap; | ||
|
||
public final class ResultHandlerFacadeFactory { | ||
|
||
private ResultHandlerFacadeFactory() {} | ||
|
||
public static ResultHandlerFacade create() { | ||
return new ResultHandlerService(new HashMap<>()); | ||
} | ||
} |
5 changes: 0 additions & 5 deletions
5
dew-common/src/dev/shiza/dew/subscription/SubscriptionFacade.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
dew-common/src/dev/shiza/dew/subscription/SubscriptionFacadeFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package dev.shiza.dew.subscription; | ||
|
||
import java.util.HashMap; | ||
|
||
public final class SubscriptionFacadeFactory { | ||
|
||
private SubscriptionFacadeFactory() {} | ||
|
||
public static SubscriptionFacade create() { | ||
return new SubscriptionService(new HashMap<>()); | ||
} | ||
} |