Joke Collection Website - Public benefit messages - Q: On the secondary development of micro-eco-SMS.

Q: On the secondary development of micro-eco-SMS.

1. Write your own implementation. Only need to implement the SMSService interface provided by Pan Micro:

Public interface SMS service (

public boolean send SMS(String SMS id,String number,String msg);

}

Suppose it is realized like this:

The public class TestService implements SmsService{

public boolean sendSMS(String SMS id,String number,String msg){

System.out.println ("Recipient:"+number);

System.out.println ("test message:"+msg);

Return true

}

}

Then the ecosystem will call the sendSMS method in TestService when sending SMS.

2. Deploy the above realization into ecology. Just modify sms.xml, or take the above implementation as an example:

& lt module id="sms "version =" 1.0.0" >

& lt service point id = "SMS sender" interface = "weaver.sms.SMS service" >

& ltinvoke-factory & gt;

& ltconstruct class="TestService " >

& lt/construct & gt;

& lt/invoke-factory & gt;

& lt/ service point & gt

& lt/module & gt;