public void run(){
//需要实现的功能的代码
System.out.println("++++++++++++++++++++++++++++++");
try {
//reqGps=new ReqGpsServiceDaoImpl();
//访问逻辑流得到请求GPS的message对象
reqGps.chuanBoJingWeiDuService();
//将对象传给GPS获得返回的信息
//将这个返回的信息通过逻辑流存入数据库
} catch (Exception e) {
e.printStackTrace();
}
//任务结束
}
public void afterPropertiesSet() throws Exception {
Timer timer = null;
Date datetime = new Date();
timer = new Timer();
System.out.println("\t\t-----------我的普元 定时器已经启动...");
//定时器间隔时常 30秒
timer.scheduleAtFixedRate(new MyTimerTask() , datetime, 5*1000);
}