|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.document.Advertisement
net.jxta.document.ExtendableAdvertisement
net.jxta.protocol.TransportAdvertisement
net.jxta.impl.protocol.HTTPAdv
public class HTTPAdv
Configuration parameters for HttpServelet Message Transport.
Nested Class Summary | |
---|---|
static class |
HTTPAdv.Instantiator
Our instantiator. |
Field Summary |
---|
Fields inherited from class net.jxta.protocol.TransportAdvertisement |
---|
protocol |
Method Summary | |
---|---|
static String |
getAdvertisementType()
Returns the identifying type of this Advertisement. |
String |
getAdvType()
Returns the identifying type of this Advertisement. |
String |
getConfigMode()
returns the config mode. |
Document |
getDocument(MimeMediaType encodeAs)
Write this advertisement into a document of the requested type. |
String[] |
getIndexFields()
Returns the element names on which this advertisement should be indexed. |
String |
getInterfaceAddress()
Returns the interfaceAddr. |
int |
getPort()
Returns the port number to which server sockets are locally bound. |
String |
getProxy()
Deprecated. This has been deprecated. Set your proxy directly with the JVM |
boolean |
getPublicAddressOnly()
|
String |
getServer()
|
protected boolean |
handleElement(Element raw)
Process an individual element from the document during parse. |
boolean |
isClientEnabled()
|
boolean |
isProxyEnabled()
Deprecated. This has been deprecated. Set your proxy directly with the JVM |
boolean |
isServerEnabled()
|
void |
setClientEnabled(boolean enabled)
|
void |
setConfigMode(String mode)
set the config mode. |
void |
setInterfaceAddress(String address)
Sets the interfaceAddr. |
void |
setPort(int newPort)
Sets the port number to which server sockets are locally bound. |
void |
setProxy(String name)
Deprecated. This has been deprecated. Set your proxy directly with the JVM |
void |
setProxyEnabled(boolean enabled)
Deprecated. This has been deprecated. Set your proxy directly with the JVM |
void |
setPublicAddressOnly(boolean only)
|
void |
setServer(String name)
|
void |
setServerEnabled(boolean enabled)
|
Methods inherited from class net.jxta.protocol.TransportAdvertisement |
---|
getBaseAdvType, getID, getProtocol, setProtocol |
Methods inherited from class net.jxta.document.ExtendableAdvertisement |
---|
handleAttribute |
Methods inherited from class net.jxta.document.Advertisement |
---|
clone, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static String getAdvertisementType()
Advertisement adv = module.getSomeAdv();
String advType = adv.getAdvertisementType();
This is wrong and does not work the way you might expect.
This call is not polymorphic and calls
Advertisement.getAdvertisementType() no matter what the real type of the
advertisement.
public String getAdvType()
Advertisement.getAdvertisementType()
this method will return the correct
runtime type of an Advertisement object.
This implementation is provided for existing advertisements which do not
provide their own implementation. In most cases you should provide your
own implementation for efficiency reasons.
getAdvType
in class Advertisement
protected boolean handleElement(Element raw)
protected boolean handleElement(Element elem) {
if (super.handleElement()) {
// it's been handled.
return true;
}
... handle elements here ...
// we don't know how to handle the element
return false;
}
handleElement
in class ExtendableAdvertisement
raw
- The element to be processed.
true
if the element was recognized, otherwise false.public Document getDocument(MimeMediaType encodeAs)
"text/plain"
encodes
the document in a "pretty-print" format for human viewing and
"text/xml" which provides an XML format.
We don't have any content to add, just build the document instance and
return it to implementations that actually do something with it.
NB : we do not try to enforce dependency rules
such as Proxy only when router, because we want to convey the complete
configuration, even items corresponding to not currently enabled
features. HttpTransport will gracefully disregard items that have
no use in the current context.
- Overrides:
getDocument
in class ExtendableAdvertisement
- Parameters:
encodeAs
- MimeMediaType format representation requested.
- Returns:
- The
Advertisement
represented as a Document
of
the requested MIME Media Type.
public String getInterfaceAddress()
public void setInterfaceAddress(String address)
address
- The addresspublic boolean getPublicAddressOnly()
public void setPublicAddressOnly(boolean only)
public String getConfigMode()
public void setConfigMode(String mode)
mode
- Can be "auto", "manual" other settings will act as the default
which is "auto".public int getPort()
public void setPort(int newPort)
newPort
- the port@Deprecated public String getProxy()
public String getServer()
@Deprecated public boolean isProxyEnabled()
public boolean isServerEnabled()
public boolean isClientEnabled()
@Deprecated public void setProxy(String name)
name
- the proxy stringpublic void setServer(String name)
@Deprecated public void setProxyEnabled(boolean enabled)
enabled
- true if proxy is enabledpublic void setServerEnabled(boolean enabled)
public void setClientEnabled(boolean enabled)
public String[] getIndexFields()
getIndexFields
in class Advertisement
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |