?? outermsgsender.java
字號(hào):
package org.acerge.message.support;
import org.acerge.message.Message;
public class OuterMsgSender {
private Connection connection;
public boolean available(){
return (connection!=null && connection.available());
}
public OuterMsgSender(Connection con){
connection = con;
}
public OuterMsgSender(){
connection = null;
}
public void send(Message msg){
if(available())
connection.sendData(msg);
else
System.err.println("OuterMsgSender is not available, " +
"you maybe need invoke setConnection(con)!");
}
public Connection getConnection() {
return connection;
}
public void setConnection(Connection connection) {
this.connection = connection;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -