cn.xishan.oftenporter.bridge.http.server.HServerServlet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Porter-Bridge-Http Show documentation
Show all versions of Porter-Bridge-Http Show documentation
转接远程的http接口,服务器响应正确的数据格式必须是JResponse定义的格式。
客户端websocket使用"org.java-websocket:Java-WebSocket:1.5.2",项目地址https://github.com/TooTallNate/Java-WebSocket;
对Java-WebSocket做了适当修改。
The newest version!
//package cn.xishan.oftenporter.bridge.http.server;
//
//import cn.xishan.oftenporter.porter.core.init.PorterConf;
//import cn.xishan.oftenporter.porter.core.bridge.Delivery;
//import cn.xishan.oftenporter.servlet.OftenServlet;
//
//import javax.servlet.ServletException;
//
///**
// *
// * 初始参数还有:
// * contextName
// *
// *
// * @author Created by https://github.com/CLovinr on 2016/10/7.
// */
//public abstract class HServerServlet extends OftenServlet
//{
// private String contextName;
//
// public HServerServlet()
// {
// super();
// }
//
// public HServerServlet(String bridgeName, String contextName, boolean responseWhenException)
// {
// super(bridgeName, responseWhenException);
// this.contextName = contextName;
// }
//
// public abstract Delivery getBridgeDelivery();
//
// @Override
// public final void init() throws ServletException
// {
// super.init();
// if (contextName == null)
// {
// contextName = getInitParameter("contextName");
// }
// PorterConf porterConf = newPorterConf();
// porterConf.setContextName(contextName);
// porterConf.addContextAutoSet("hServerDelivery", getBridgeDelivery());
// porterConf.getSeekPackages().addObjectPorter(new HServerPorter()
// {
// });
// startOne(porterConf);
// }
//}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy