OtherContentConnectorCoreExt.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:CommonInformationSpace 作者:
/**
 * This message is called by the ConnectorCore when a message was receive. It will be translatet to the Application
 * representation and the translatet message if send via the registered callback to the application.
 * 
 * @param msg
 * @throws InvalidObjectException
 */
public void msgReceived(CISPayload payload) throws InvalidObjectException {
    log.info("--> messageReceived");

    if (payload instanceof CISOtherContent) {
        CISOtherContent otherCont = (CISOtherContent)payload;
        if (otherCont.getMimeType().equalsIgnoreCase(CoreConstants.MIME_TYPE_KMZ)) {
            AppCallbackHandlerImpl.getInstance().getCallback(CoreConstants.MSGTYPE_KMZ).msgReceived(payload);
        } else if (otherCont.getMimeType().equalsIgnoreCase(CoreConstants.MIME_TYPE_WMS)) {
            AppCallbackHandlerImpl.getInstance().getCallback(CoreConstants.MSGTYPE_WMS).msgReceived(payload);
        } else if (otherCont.getMimeType().equalsIgnoreCase(CoreConstants.MIME_TYPE_WFS)) {
            AppCallbackHandlerImpl.getInstance().getCallback(CoreConstants.MSGTYPE_WFS).msgReceived(payload);
        } if (otherCont.getMimeType().equalsIgnoreCase(CoreConstants.MIME_TYPE_MLP)) {
            AppCallbackHandlerImpl.getInstance().getCallback(CoreConstants.MSGTYPE_MLP).msgReceived(payload);
        }

    } else {
        throw new InvalidObjectException("Object is not OtherContent Object!");
    }


    log.info("messageReceived -->");
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号