package com.brilliance.isc.common.validator.es.support.impl;

import com.brilliance.isc.common.validator.es.support.IJavaCallback;
import jdk.nashorn.api.scripting.ScriptObjectMirror;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class NotifyCallback implements IJavaCallback {

    private static Logger logger = LoggerFactory.getLogger(NotifyCallback.class);

    @Override
    public Object callback(Object... args) {
        ScriptObjectMirror objectMirror = (ScriptObjectMirror)args[0];
        logger.info("{}-{}-{}",objectMirror.get("type"),objectMirror.get("title"),objectMirror.get("message"));
        return null;
    }
}
