@@ -31,6 +31,8 @@ public final class Entity {
3131 private int minPoolSize ;
3232 private int maxPoolSize ;
3333
34+ private String channel ;
35+
3436 public Entity (
3537 String actorName ,
3638 Class <?> actorType ,
@@ -43,7 +45,8 @@ public Entity(
4345 Map <String , EntityMethod > actions ,
4446 Map <String , EntityMethod > timerActions ,
4547 int minPoolSize ,
46- int maxPoolSize ) {
48+ int maxPoolSize ,
49+ String channel ) {
4750 this .actorName = actorName ;
4851 this .actorType = actorType ;
4952 this .kind = kind ;
@@ -56,6 +59,7 @@ public Entity(
5659 this .timerActions = timerActions ;
5760 this .minPoolSize = minPoolSize ;
5861 this .maxPoolSize = maxPoolSize ;
62+ this .channel = channel ;
5963 }
6064
6165 public String getActorName () {
@@ -98,6 +102,10 @@ public Map<String, EntityMethod> getActions() {
98102 return actions ;
99103 }
100104
105+ public Map <String , EntityMethod > getTimerActions () {
106+ return timerActions ;
107+ }
108+
101109 public int getMinPoolSize () {
102110 return minPoolSize ;
103111 }
@@ -106,6 +114,8 @@ public int getMaxPoolSize() {
106114 return maxPoolSize ;
107115 }
108116
117+ public String getChannel (){ return channel ; }
118+
109119 public enum EntityMethodType {
110120 DIRECT , TIMER
111121 }
@@ -184,6 +194,7 @@ public String toString() {
184194 sb .append (", timerActions=" ).append (timerActions );
185195 sb .append (", minPoolSize=" ).append (minPoolSize );
186196 sb .append (", maxPoolSize=" ).append (maxPoolSize );
197+ sb .append (", channel=" ).append (channel );
187198 sb .append ('}' );
188199 return sb .toString ();
189200 }
@@ -204,6 +215,7 @@ public static Entity fromAnnotationToEntity(Class<?> entity, NamedActor actor) {
204215 final Class stateType = actor .stateType ();
205216 final int minPoolSize = actor .minPoolSize ();
206217 final int maxPoolSize = actor .maxPoolSize ();
218+ final String channel = actor .channel ();
207219
208220 final Map <String , Entity .EntityMethod > actions = buildActions (entity , Action .class );
209221 final Map <String , Entity .EntityMethod > timerActions = buildActions (entity , TimerAction .class );
@@ -220,7 +232,9 @@ public static Entity fromAnnotationToEntity(Class<?> entity, NamedActor actor) {
220232 actions ,
221233 timerActions ,
222234 minPoolSize ,
223- maxPoolSize );
235+ maxPoolSize ,
236+ channel
237+ );
224238
225239 log .info ("Registering NamedActor: {}" , actorName );
226240 log .debug ("Registering Entity -> {}" , entityType );
@@ -243,6 +257,7 @@ public static Entity fromAnnotationToEntity(Class<?> entity, UnNamedActor actor)
243257 final Class stateType = actor .stateType ();
244258 final int minPoolSize = actor .minPoolSize ();
245259 final int maxPoolSize = actor .maxPoolSize ();
260+ final String channel = actor .channel ();
246261
247262 final Map <String , Entity .EntityMethod > actions = buildActions (entity , Action .class );
248263 final Map <String , Entity .EntityMethod > timerActions = buildActions (entity , TimerAction .class );
@@ -259,7 +274,8 @@ public static Entity fromAnnotationToEntity(Class<?> entity, UnNamedActor actor)
259274 actions ,
260275 timerActions ,
261276 minPoolSize ,
262- maxPoolSize );
277+ maxPoolSize ,
278+ channel );
263279
264280 log .info ("Registering UnNamedActor: {}" , actorName );
265281 log .debug ("Registering Entity -> {}" , entityType );
@@ -283,6 +299,7 @@ public static Entity fromAnnotationToEntity(Class<?> entity, PooledActor actor)
283299 final Class stateType = actor .stateType ();
284300 final int minPoolSize = actor .minPoolSize ();
285301 final int maxPoolSize = actor .maxPoolSize ();
302+ final String channel = actor .channel ();
286303
287304 final Map <String , Entity .EntityMethod > actions = buildActions (entity , Action .class );
288305 final Map <String , Entity .EntityMethod > timerActions = buildActions (entity , TimerAction .class );
@@ -299,7 +316,8 @@ public static Entity fromAnnotationToEntity(Class<?> entity, PooledActor actor)
299316 actions ,
300317 timerActions ,
301318 minPoolSize ,
302- maxPoolSize );
319+ maxPoolSize ,
320+ channel );
303321
304322 log .info ("Registering PooledActor: {}" , actorName );
305323 log .debug ("Registering Entity -> {}" , entityType );
0 commit comments