Giter Club home page Giter Club logo

message-java-parent's Introduction

###message-java-parent

    MessageRouter messageRouter = new MessageRouter();

    messageRouter
            .rule()
            .async(false)
            .msgType(MessageType.App)
            .event(MessageEvent.unicast)
            .handler(new AppPushMessage())
            .configStorage(new AppPushMessageConfigStorage("http://msg.umeng.com/api/send", "xxxxxxxxxxxxx", "xxxxxxxxxxxxxxx", MessageType.App),new AppPushMessageConfigStorage("http://msg.umeng.com/api/send", "xxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxx", MessageType.App))
            .next()
            .rule()
            .async(false)
            .msgType(MessageType.Email)
            .event(MessageEvent.unicast)
            .handler(new EmailMessage())
            .configStorage(new EmailMessageConfigStorage("http://email.com", "user", "pwd", MessageType.Email))
            .reEnter(true)
            .next()
            .rule()
            .async(false)
            .msgType(MessageType.SMS)
            .event(MessageEvent.unicast, MessageEvent.batch)
            .handler(new SMSMessage())
            .configStorage(new SMSMessageConfigStorage("http://api.chanzor.com/send", "xxxxx", "xxxxxxxxxxxxxxxxx", "", true, MessageType.SMS))
            .reEnter(true)
            .next()
            .rule()
            .async(false)
            .msgType(MessageType.SMS)
            .event(MessageEvent.radio)
            .handler(new SMSMessage())
            .configStorage(new SMSMessageConfigStorage("http://api.chanzor.com/send", "xxxxxx", "xxxxxxxxxxxxxxxxxxxx1", "", true, MessageType.SMS))
            .reEnter(true)
            .next()
            .rule()
            .async(false)
            .event(MessageEvent.radio)
            .msgType(MessageType.Web)
            .handler(new WebMessage())
            .end()
    ;
    List<MessageType> messageTypes = new ArrayList<>();
    messageTypes.add(MessageType.App);
    messageTypes.add(MessageType.SMS);
    Message message = new Message("user", "to", messageTypes, "title", "content");
    message.setEvent(MessageEvent.unicast);
    messageRouter.route(message);

message-java-parent's People

Watchers

 avatar

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.