Coder Social home page Coder Social logo

liqinew / handlerframe Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 11.0 1.39 MB

:cow: HandlerFrame是一个基于观察者模式采用信息分发机制实现跨界面Handler通讯框架,整个项目里面只存在一个Handler实例对象。

Java 100.00%
handlebars handler basehandler

handlerframe's Introduction

HandlerFrame框架

HandlerFrame是一个基于观察者模式采用信息分发机制去实现跨界面Handler通讯框架。只要在HandlerFrame里面订阅过的对象,在任何界面都可以发送信息去跟订阅对象通讯。 且整个项目里面只存在一个Handler实例对象,不用担心因为Handler对象造成的内存问题。

架构图

架构图 使用方法

Gradle

1:在项目根目录build.gradley

allprojects {
  repositories {
    //依赖仓库
   maven { url 'https://jitpack.io' }
  }
}

2:依赖HandlerFrame框架

compile 'com.github.liqinew:handlerframe:v1.0.0'

HandlerFrame框架使用简介

//获取BaseHandler操作对象
BaseHandlerOperate.getBaseHandlerOperate()

//把OnBaseHandlerUpDateListener接口实现对象和指定对象订阅进Handler容器中
.onSubscribe(SubscribeObject,new OnBaseHandlerUpDateListener())

//给指定的界面发送Message
.sendMessage(AcceptTheObjectOfYheInformation, Message-What, SendTheMessageContent)

//移除(注销)指定订阅对象
.removeSubscribe(SubscribeObject)

//移除(注销)所有订阅对象
.removeSubscribe();

“OnBaseHandlerUpDateListener”Handler信息接受回调更新接口

实现OnBaseHandlerUpDateListener接口去接受传输的Message。

如果觉得不错,请star给我动力。非常感谢

如有问题,请查看我的博客文档

我的博客

License

Copyright 2017 Liqi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

handlerframe's People

Contributors

liqinew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

handlerframe's Issues

Mobai big god

It's so nb you are, why not name it as NoHandler or QigeHandler, I think that is better than EventBusHandler(low b)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.