| Parse a line of input into AddressEntries.
Lines starting with "#", "[", or "//" are ignored.
A line starting with "name=" is decoded as a compete bundle.
Also, a line matching:
NAME={DATA}
is parsed as a bundle:
name=NAME ttd=DEFAULT_TTD entries={DATA}
For example:
Foo={\
http=http://bar.com:8800/$Foo,\
-RMI=rmi://123.45.67.89:9876/theStubId\
}
See
BundleDecoder for bundle parsing details.
Another pattern is:
NAME=(AGENT@)?((TYPE[:,])?SCHEME://)?URI
If an AGENT is specified then an entry is created:
(name=NAME type=alias uri=name:///AGENT)
plus an entry is created for the remainer of
the line:
If TYPE and SCHEME are missing, and URI is "multicast",
then TYPE is left as null, SCHEME is set to "multicast",
and the URI is set to the DEFAULT_MULTICAST_URI.
The default SCHEME is "rmi".
The default TYPE is:
"-" + String.toUpperCase(SCHEME) + "_REG"
The FILTER is the AGENT if specified, else "*".
If the SCHEME is "rmi" and the TYPE is "-RMI_REG", then
a ("/"+FILTER) is appended to the URI.
If the SCHEME is "http" or "https" and the TYPE is "-HTTP"
or "-HTTPS" (respectively), and the URI lacks a path, then
the "/$"+FILTER+"/wp_bootstrap" is appended to the URI, where
the default FILTER is "~".
The line is then parsed to:
(name=NAME type=TYPE uri=SCHEME://URI)
For example,
Foo=Bar@qux://a:1/b
is parsed as two AddressEntries:
(name=Foo type=alias uri=name:///Bar)
(name=Foo type=-QUX_REG uri=qux://a:1/b)
For backwards compatibility, the following lines are
reserved:
hostname=HOST
address=HOST
port=PORT
alias= ignored
lpsport= ignored
HOST and PORT are saved and used at the end of the parsing to
create a "WP=HOST:PORT" line.
Also, if the line ends in ":5555", then this is trimmed off,
since this is the ancient PSP server port.
|