실시간 데이터로 끊임없이 전달되는 방법이 있습니다. 성능 향상을 위해 스레드 내부 전체 방법 본체를 넣어 어떤 이점이있다,실시간 메시지 처리 방법 본문이 별도 스레드에
void processMessage(String messageBeingPassed) {
//evaluate the message here and do something with it
//depending on the current state of the message
//if message.equals("test")
//call separate thread to save to database etc...
//etc...
}
내 질문은 :
방법은 다음 데이터를 평가?
같은 : 어떤 응답을
이void processMessage(String messageBeingPassed) {
Runnable runnable = new Runnable() {
public void run() {
//evaluate the message here and do something
//depending on the current state of the message
//if message.equals("test")
//call separate thread to save to database etc...
//etc...
}
//start main body thread for this current message etc...
}
}
감사합니다.
묻지 마십시오. 법안. * 귀하는 * 코드와 데이터에 대한 액세스 권한이있는 유일한 사람입니다. 그것을 위로 돌려 놓으십시오. 그러면 인터넷에있는 사람들의 추측에 의존하는 대신 * 알 수 있습니다. 응답에 대해 – jason