Cov txheej txheem:

Kuv yuav pib RMI npe li cas?
Kuv yuav pib RMI npe li cas?

Video: Kuv yuav pib RMI npe li cas?

Video: Kuv yuav pib RMI npe li cas?
Video: txhob hnov qab kuv lub npe - Bee lee [Official MV] 2022-23 2024, Kaum ib hlis
Anonim

Pib lub Java RMI npe

Rau pib tus npe , khiav rmregistry hais kom ua ntawm server tus tswv. Cov lus txib no ua rau tsis muaj qhov tso zis (thaum ua tiav) thiab feem ntau khiav hauv keeb kwm yav dhau. Yog xav paub ntxiv, saib cov ntaub ntawv cov cuab yeej rau rmregistry [Solaris, Windows].

Kuj nug, RMI npe yog dab tsi?

Java's Remote Method Invocation ( RMI ) Sau npe yog qhov tseem ceeb ntawm kev pabcuam directory. Ib yam khoom nyob deb npe yog bootstrap naming kev pab cuam uas yog siv los ntawm RMI servers ntawm tib lub party los khi tej thaj chaw deb khoom rau npe.

Dab tsi yog naming lookup method hauv RMI? Qhov no npe. lookup() hu tshuaj xyuas RMI Registry khiav hauv localhost rau kev khi hauv lub npe "Hello". Nws rov ib Yam khoom uas yuav tsum tau muab pov rau txhua qhov chaw taws teeb interface uas koj xav kom nws ua. Tom qab ntawd koj tuaj yeem siv qhov ntawd khoom hu rau tej thaj chaw deb txoj kev teev nyob rau hauv lub interface.

Kuj kom paub yog, Kuv yuav ua li cas thiaj li khiav ib daim ntawv thov RMI?

Cov kauj ruam los khiav daim ntawv thov RMI no

  1. compile tag nrho cov ntaub ntawv java javac *.java.
  2. Pib RMI npe pib rmiregistry.
  3. Khiav Server file java AddServer.
  4. Khiav Client cov ntaub ntawv hauv lwm qhov kev hais kom ua abd dhau lub chaw nres nkoj hauv zos tus lej ntawm lub sijhawm khiav java Client 127.0.0.1.

RMI chaw nres nkoj yog dab tsi?

Kev teeb tsa RMI chaw nres nkoj . Lub Impact Server qhib ib tug xov tooj ntawm chaw nres nkoj ntawm lub tshuab rau Java™ Remote Method Invocation ( RMI ) kev ua haujlwm. Muaj ob peb yam khoom uas koj tuaj yeem siv los tswj qhov twg chaw nres nkoj siv. Los ntawm lub neej ntawd, ib qho random chaw nres nkoj yog qhib rau lub host system uas yog siv los ntawm lub RMI npe.

Pom zoo: