Search in sources :

Example 36 with EzyResponse

use of com.tvd12.ezyfoxserver.response.EzyResponse in project ezyfox-server by youngmonkeys.

the class EzySimpleAppUserDelegate method newExitedAppResponse.

protected EzyResponse newExitedAppResponse(EzyConstant reason) {
    EzyExitedAppParams params = new EzyExitedAppParams();
    EzyAppSetting appSetting = appContext.getApp().getSetting();
    params.setApp(appSetting);
    params.setReason(reason);
    return new EzyExitedAppResponse(params);
}
Also used : EzyExitedAppParams(com.tvd12.ezyfoxserver.response.EzyExitedAppParams) EzyAppSetting(com.tvd12.ezyfoxserver.setting.EzyAppSetting) EzyExitedAppResponse(com.tvd12.ezyfoxserver.response.EzyExitedAppResponse)

Example 37 with EzyResponse

use of com.tvd12.ezyfoxserver.response.EzyResponse in project ezyfox-server by youngmonkeys.

the class EzySimpleAppUserDelegate method responseUserRemoved.

protected void responseUserRemoved(EzyUser user, EzyConstant reason) {
    EzyResponse response = newExitedAppResponse(reason);
    EzyZoneContext zoneContext = appContext.getParent();
    zoneContext.send(response, user, false);
}
Also used : EzyZoneContext(com.tvd12.ezyfoxserver.context.EzyZoneContext) EzyResponse(com.tvd12.ezyfoxserver.response.EzyResponse)

Aggregations

EzyResponse (com.tvd12.ezyfoxserver.response.EzyResponse)25 EzySession (com.tvd12.ezyfoxserver.entity.EzySession)17 Test (org.testng.annotations.Test)12 EzyResponseApi (com.tvd12.ezyfoxserver.api.EzyResponseApi)11 EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)9 EzySendResponseImpl (com.tvd12.ezyfoxserver.command.impl.EzySendResponseImpl)8 EzySimpleResponse (com.tvd12.ezyfoxserver.response.EzySimpleResponse)8 EzySimpleSettings (com.tvd12.ezyfoxserver.setting.EzySimpleSettings)8 EzyPackage (com.tvd12.ezyfoxserver.response.EzyPackage)7 EzyZoneContext (com.tvd12.ezyfoxserver.context.EzyZoneContext)5 EzyUser (com.tvd12.ezyfoxserver.entity.EzyUser)4 EzyArray (com.tvd12.ezyfox.entity.EzyArray)3 EzyErrorParams (com.tvd12.ezyfoxserver.response.EzyErrorParams)3 EzyAppSetting (com.tvd12.ezyfoxserver.setting.EzyAppSetting)3 EzyApplication (com.tvd12.ezyfoxserver.EzyApplication)2 EzyBroadcastEvent (com.tvd12.ezyfoxserver.command.EzyBroadcastEvent)2 EzyAppContext (com.tvd12.ezyfoxserver.context.EzyAppContext)2 EzySimpleServerContext (com.tvd12.ezyfoxserver.context.EzySimpleServerContext)2 EzySimpleUser (com.tvd12.ezyfoxserver.entity.EzySimpleUser)2 EzySimpleServerReadyEvent (com.tvd12.ezyfoxserver.event.EzySimpleServerReadyEvent)2