Search in sources :

Example 1 with EzyRequestPluginResponseParams

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

the class EzyPluginSendResponseImpl method newResponse.

protected EzyResponse newResponse(EzyData data) {
    EzyPluginSetting setting = context.getPlugin().getSetting();
    EzyRequestPluginResponseParams params = newResponseParams();
    params.setPluginId(setting.getId());
    params.setData(data);
    return new EzyRequestPluginResponse(params);
}
Also used : EzyRequestPluginResponseParams(com.tvd12.ezyfoxserver.response.EzyRequestPluginResponseParams) EzyRequestPluginResponse(com.tvd12.ezyfoxserver.response.EzyRequestPluginResponse) EzyPluginSetting(com.tvd12.ezyfoxserver.setting.EzyPluginSetting)

Example 2 with EzyRequestPluginResponseParams

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

the class EzyRequestPluginResponseTest method test.

@Test
public void test() {
    EzyArray data = EzyEntityFactory.EMPTY_ARRAY;
    EzyRequestPluginResponseParams params = new EzyRequestPluginResponseParams();
    params.setData(data);
    params.setPluginId(1);
    assert params.getData() == data;
    assert params.getPluginId() == 1;
    EzyRequestPluginResponse response = new EzyRequestPluginResponse(params);
    assert response.getParams() == params;
    assert response.serialize().size() >= 0;
    response.release();
}
Also used : EzyRequestPluginResponseParams(com.tvd12.ezyfoxserver.response.EzyRequestPluginResponseParams) EzyArray(com.tvd12.ezyfox.entity.EzyArray) EzyRequestPluginResponse(com.tvd12.ezyfoxserver.response.EzyRequestPluginResponse) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

EzyRequestPluginResponse (com.tvd12.ezyfoxserver.response.EzyRequestPluginResponse)2 EzyRequestPluginResponseParams (com.tvd12.ezyfoxserver.response.EzyRequestPluginResponseParams)2 EzyArray (com.tvd12.ezyfox.entity.EzyArray)1 EzyPluginSetting (com.tvd12.ezyfoxserver.setting.EzyPluginSetting)1 BaseTest (com.tvd12.test.base.BaseTest)1 Test (org.testng.annotations.Test)1