use of com.tvd12.ezyfox.entity.EzyData in project ezyfox-server by youngmonkeys.
the class EzyAppSendResponseImpl method execute.
@Override
public void execute(EzyData data, Collection<EzySession> recipients, boolean encrypted, EzyTransportType transportType) {
EzyResponse response = newResponse(data);
serverContext.send(response, recipients, encrypted, transportType);
}
use of com.tvd12.ezyfox.entity.EzyData in project ezyfox-server by youngmonkeys.
the class EzyPluginSendResponseImpl method execute.
@Override
public void execute(EzyData data, EzySession recipient, boolean encrypted, EzyTransportType transportType) {
EzyResponse response = newResponse(data);
serverContext.send(response, recipient, encrypted, transportType);
}
use of com.tvd12.ezyfox.entity.EzyData 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);
}
use of com.tvd12.ezyfox.entity.EzyData in project ezyfox-server by youngmonkeys.
the class EzyAbstractArrayResponse method getResponseData.
@Override
protected EzyData getResponseData() {
EzyArray array = data != null ? marshaller.marshal(data) : newArrayBuilder().build();
if (additionalParams != null) {
for (Object object : additionalParams) {
Object value = marshaller.marshal(object);
array.add(value);
}
}
return array;
}
use of com.tvd12.ezyfox.entity.EzyData in project ezyfox-server by youngmonkeys.
the class EzyAbstractObjectResponse method getResponseData.
@Override
protected EzyData getResponseData() {
EzyObject object = data != null ? marshaller.marshal(data) : newObjectBuilder().build();
if (additionalParams != null) {
for (Map.Entry<Object, Object> e : additionalParams.entrySet()) {
Object skey = marshaller.marshal(e.getKey());
Object svalue = marshaller.marshal(e.getValue());
object.put(skey, svalue);
}
}
if (excludeParamKeys != null) {
object.removeAll(excludeParamKeys);
}
return object;
}
Aggregations