君子博学而日参省乎己 则知明而行无过矣

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 107 下一页

2013年3月20日 #

摘要: 回顾Context类的start方法,还有一部分是启动调度器的方法/** * Start up the Scheduler. */ private void startScheduler() { traversalScheduler = (TraversalSchedu... 阅读全文
posted @ 2013-03-20 01:11 刺猬的温驯 阅读(326) 评论(0) 推荐(0)

摘要: 本文分析一下ConnectorInterfaces类的代码,该类主要提供了访问连接器的相关依赖类的一下方法,供ConnectorCoordinatorImpl类调用,其源码如下:/** * Access to the AuthenticationManager, AuthorizationManager, and * TraversalManagager for a Connector instance. */public class ConnectorInterfaces { private final String connectorName; private final Connec.. 阅读全文
posted @ 2013-03-20 00:33 刺猬的温驯 阅读(351) 评论(0) 推荐(0)

摘要: 本文接着分析连接器及其构造工厂相关设计及源码,先浏览一下下面的UML模型图:ConnectorFactory为Connector类型连接器接口,ConnectorInstanceFactor为工厂实现类(这里是反射工厂);Connector接口下面的实现类均为具体的连接器类;ConnectorFac... 阅读全文
posted @ 2013-03-20 00:22 刺猬的温驯 阅读(508) 评论(0) 推荐(0)

2013年3月19日 #

摘要: 前面的源码分析由于沿着方法调用跟踪,还有部分类及接口未来得及分析,这里要说的是LoadManagerFactory接口与LoadManager接口及相关类等,先浏览一下UML模型图:这里又是工厂模式,这里的LoadManagerFactory接口及实现类HostLoadManagerFactory源码我就不贴出来了下面分析LoadManager接口源码:/** * Interface for a {@link LoadManager} implementations. */public interface LoadManager extends BatchResultRecorder { /. 阅读全文
posted @ 2013-03-19 04:13 刺猬的温驯 阅读(313) 评论(0) 推荐(0)

摘要: 这里分析一下FeedConnection接口及其实现类GsaFeedConnection相关源码:FeedConnection接口源码如下:/** * Interface for a feed connection. This takes in a data source name and a data * source object that contains the data to be sent. The actual connection to * the feed server should be established by the implementation during *. 阅读全文
posted @ 2013-03-19 03:33 刺猬的温驯 阅读(445) 评论(0) 推荐(0)

摘要: 接下来继续分析PusherFactory类及Pusher类的相关源码实现先浏览一下相关UML模型图:我们从该图可以看到,连接器最终是通过FeedConnection类型对象向应用中心发送xmlfeed数据的(勘误:企业搜索引擎开发之连接器connector(六)中的UML图 这部分有点出入)PusherFactory类是Pusher类的工厂类,现在来看PusherFactory源码:/** * Interface for a factory that creates {@link Pusher} instances for use by a * {@link com.google.enterp 阅读全文
posted @ 2013-03-19 03:10 刺猬的温驯 阅读(359) 评论(0) 推荐(0)

摘要: 接下来继续分析TimedCancelable类及QueryTraverser类TimedCancelable类的源码如下:/** * A {@link TimedCancelable} for running a {@link Connector} batch using * a {@link Traverser} */class CancelableBatch implements TimedCancelable { private static final Logger LOGGER = Logger.getLogger(CancelableBatch.class.getName(... 阅读全文
posted @ 2013-03-19 01:48 刺猬的温驯 阅读(328) 评论(0) 推荐(0)

摘要: 在继续分析TimedCancelable类及QueryTraverser类之前有必要熟悉一下ThreadPool类和TaskHandle类, 这两者的作用是以线程池的方式执行连接器的功能ThreadPool类源码如下:/** * Pool for running {@link TimedCancel... 阅读全文
posted @ 2013-03-19 01:14 刺猬的温驯 阅读(439) 评论(0) 推荐(0)

2013年3月18日 #

摘要: 在继续分析源码前,有必要熟悉一下连接器的UML模型图,不然面对那错综芜杂的依赖关系难免使人无法理清头绪先熟悉一下下面的uml模型:我画的该图示不全的,为的是避免细节的干扰而更能够清晰的表述连接器的UML模型ConnectorCoordinatorImpl类通过成员变量ThreadPool调用实现多线... 阅读全文
posted @ 2013-03-18 22:13 刺猬的温驯 阅读(451) 评论(0) 推荐(0)

摘要: 沿着方法的调用一路这么跟踪源码,有时未免使人陷入细节而找不到方向,可是对于全局的把握而又不得不跟踪这些源码入手上文的Instantiator接口及其实现类SpringInstantiator管理着全局的连接器类型及其实例现在接下来跟踪ConnectorCoordinator接口,该接口主要是操作具体... 阅读全文
posted @ 2013-03-18 05:07 刺猬的温驯 阅读(490) 评论(0) 推荐(0)

上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 107 下一页