📄 new_adv_sample.txt
字号:
<EditorialNotes>
Unique IDs are completely fake in order to be easily recognizable.
I described only one service and one endpoint and one application.
For now, I put all the Applications in the same class.
I put <Comments> tag in PeerAdvertisement, but that's more for the
reader's enlightenment than realy intended to go in-there in the
real world. I kept all the parameters as they are today.
So far we've been propagating newly declared rendezvous by adding
them to the static list of rendezvous in the peergroup adv
and pushing that modified adv to all known rendezvous which would
merge the list in the one they have. This is no-longer necessary.
Instead we propagate specific rendezvous advertisements.
This sample uses the long forms of tags, for readability.
The real tags are abbreviated according to the table in the rationale
document.
</EditorialNotes>
---- The concept of Resolver Service ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleClassAdvertisement>
<jxta:ModuleClassAdvertisement>
<ModuleClassID> jxta://Resolver </ModuleClassID>
<Name> Resolver Class </Name>
<Description>
This is the Resolver Module class. All resolver services
are instances of this class.
</Description>
</jxta:ModuleClassAdvertisement>
---- An example of re-purposed Resolver Service ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleClassAdvertisement>
<jxta:ModuleClassAdvertisement>
<ModuleClassID> jxta://Resolver-Repurposed </ModuleClassID>
<Name> Resolver Class </Name>
<Description>
This is the Resolver Module class when used for another
purpose than the normal resolver.
</Description>
</jxta:ModuleClassAdvertisement>
---- One implementation of the Platform's resolver service ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleImplAdvertisement>
<jxta:ModuleImplAdvertisement>
<ModuleSpecID>
jxta://Resolver-vanilla
</ModuleSpecID>
<Compatibility>
<ExecFormat>JDK1.1.6</ExecFormat>
<ModuleBinding>
Ref Impl V1.0
</ModuleBinding>
</Compatibility>
<Code> net.jxta.impl.resolver.ResolverService </Code>
<Uri> http://www.jxta.org/download/jxta.jar </Uri>
<Provider>sun.com</Provider>
<Description></Description>
<Param></Param>
</jxta:ModuleImplAdvertisement>
---- The abstract definition of the Platform's resolver service ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleSpecAdvertisement>
<jxta:ModuleSpecAdvertisement>
<ModuleSpecID>
jxta://Resolver-vanilla
</ModuleSpecID>
<Name> jxta.service.Resolver.vanilla </Name>
<Creator> sun.com </Creator>
<SpecURI>
http://platform.jxta.org/spec/V1.0/JXTAProtocols.pdf
</SpecURI>
<Version> JXTA1.0 </Version>
<Description></Description>
<Param></Param>
</jxta:ModuleSpecAdvertisement>
---- The concept of Tcp Endpoint Binding ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleClassAdvertisement>
<jxta:ModuleClassAdvertisement>
<ModuleClassID> jxta://EndpointTcp </ModuleClassID>
<Name> TCP Endpoint Protocol Class </Name>
<Description>
This is the TCP Endpoint protocol class. The TCP endpoint
protocols is an instances of this class.
</Description>
</jxta:ModuleClassAdvertisement>
---- One implementation of the standard endpoint TCP binding ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleImplAdvertisement>
<jxta:ModuleImplAdvertisement>
<ModuleSpecID>
jxta://EndpointTcp-vanilla
</ModuleSpecID>
<Compatibility>
<ExecFormat>JDK1.1.6</ExecFormat>
<ModuleBinding>
Ref Impl V1.0
</ModuleBinding>
</Compatibility>
<Code> net.jxta.impl.endpoint.tcp.TcpTransport </Code>
<Uri> http://www.jxta.org/download/jxta.jar </Uri>
<Provider>sun.com</Provider>
<Description></Description>
<Param>
<!-- The following may not be changed by each peer -->
<!-- But different value may be used in order to create -->
<!-- Independent transports based on the same TcpTransport -->
<!-- class. -->
<!-- Also, TcpTransport will not tolerate overload. That's -->
<!-- built into the code, not a parameter. -->
<!-- A different tcp adv with a different protocolName will -->
<!-- not be considered overload (so, it is permitted) -->
<!-- However, there is no garantee that it will work; the -->
<!-- port numbers for unicast still have to be different -->
<!-- and that's peer configuration. -->
<ProtocolName>tcp</ProtocolName>
<MulticastAddr>
224.0.1.85
</MulticastAddr>
<MulticastPort>
1234
</MulticastPort>
<MulticastSize>
16384
</MulticastSize>
</Param>
</jxta:ModuleImplAdvertisement>
---- Abstract definition of the standard TCP binding ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleSpecAdvertisement>
<jxta:ModuleSpecAdvertisement>
<ModuleSpecID>
jxta://EndpointprotoTcp-vanilla
</ModuleSpecID>
<Name> jxta.endpoint.tcp.vanilla </Name>
<Creator> sun.com </Creator>
<SpecURI>
http://platform.jxta.org/spec/V1.0/JXTAProtocols.pdf
</SpecURI>
<Version> JXTA1.0 </Version>
<Description></Description>
<Param>
</Param>
</jxta:ModuleSpecAdvertisement>
---- The concept of Application ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleClassAdvertisement>
<jxta:ModuleClassAdvertisement>
<ModuleClassID> jxta://Application </ModuleClassID>
<Name> Application Class </Name>
<Description>
Any application is of that class.
</Description>
</jxta:ModuleClassAdvertisement>
---- One implementation of the Shell ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleImplAdvertisement>
<jxta:ModuleImplAdvertisement>
<ModuleSpecID>
jxta://Application-StandardShell
</ModuleSpecID>
<Compatibility>
<ExecFormat>JDK1.1.6</ExecFormat>
<ModuleBinding>
Ref Impl V1.0
</ModuleBinding>
</Compatibility>
<Code> net.jxta.impl.shell.bin.Shell.Shell </Code>
<Uri> http://www.jxta.org/download/jxta.jar </Uri>
<Provider> sun.com </Provider>
<Description></Description>
<Param></Param>
</jxta:ModuleImplAdvertisement>
---- Abstract defintion of the Shell ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleSpecAdvertisement>
<jxta:ModuleSpecAdvertisement>
<ModuleSpecID>
jxta://Application-StandardShell
</ModuleSpecID>
<Name> jxta.application.Shell </Name>
<Creator> sun.com </Creator>
<SpecURI>
http://platform.jxta.org/spec/V1.0/JXTAProtocols.pdf
</SpecURI>
<Version> JXTA1.0 </Version>
<Description></Description>
<Param></Param>
</jxta:ModuleSpecAdvertisement>
---- The concept of group ----
<?xml version="1.0"?>
<!DOCTYPE jxta:ModuleClassAdvertisement>
<jxta:ModuleClassAdvertisement>
<ModuleClassID> jxta://Group </ModuleClassID>
<Name> Group Class </Name>
<Description>
This is the Group class. All groups are instances of this class.
</Description>
</jxta:ModuleClassAdvertisement>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -