com.aliyun.mns.sample
类 HttpEndpoint

java.lang.Object
  继承者 com.aliyun.mns.sample.HttpEndpoint

public class HttpEndpoint
extends Object

HTTP/1.1 file server,处理发送到/notifications的请求


嵌套类摘要
 class HttpEndpoint.NSHandler
          core class for processing /notifications request
 class HttpEndpoint.RequestListenerThread
          http listen work thread
 class HttpEndpoint.SimplifiedNSHandler
           
 class HttpEndpoint.WorkerThread
          http work thread, it will dispatch /notifications to NSHandler
 
字段摘要
static org.apache.log4j.Logger logger
           
static Thread t
           
 
构造方法摘要
HttpEndpoint()
          构造函数,构造HttpEndpoint对象,默认80端口
HttpEndpoint(int port)
          构造函数,用指定端口构造HttpEndpoint对象
 
方法摘要
static String GenEndpointLocal()
          静态方法,使用本机地址用于生成一个endpoint地址
static String GenEndpointLocal(int port)
          静态方法,使用本机地址用于生成一个endpoint地址
static void main(String[] args)
          简单的使用, main函数demo
 void start()
          start http server
 void stop()
          stop http endpoint
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

logger

public static org.apache.log4j.Logger logger

t

public static Thread t
构造方法详细信息

HttpEndpoint

public HttpEndpoint(int port)
构造函数,用指定端口构造HttpEndpoint对象

参数:
port, - http server port

HttpEndpoint

public HttpEndpoint()
构造函数,构造HttpEndpoint对象,默认80端口

方法详细信息

GenEndpointLocal

public static String GenEndpointLocal()
静态方法,使用本机地址用于生成一个endpoint地址

返回:
http endpoint

GenEndpointLocal

public static String GenEndpointLocal(int port)
静态方法,使用本机地址用于生成一个endpoint地址

参数:
port, - http server port
返回:
http endpoint

start

public void start()
           throws Exception
start http server

抛出:
Exception

stop

public void stop()
stop http endpoint


main

public static void main(String[] args)
简单的使用, main函数demo



Copyright © 2016. All Rights Reserved.