Project JXTA

net.jxta.impl.protocol
Class HTTPAdv

java.lang.Object
  extended bynet.jxta.document.Advertisement
      extended bynet.jxta.document.ExtendableAdvertisement
          extended bynet.jxta.protocol.TransportAdvertisement
              extended bynet.jxta.impl.protocol.HTTPAdv

public class HTTPAdv
extends TransportAdvertisement

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()
          {@inheritDoc}
 String getConfigMode()
          returns the config mode.
 Document getDocument(MimeMediaType encodeAs)
          

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.

 String[] getIndexFields()
          
 String getInterfaceAddress()
          Returns the interfaceAddr.
 int getPort()
          Returns the port number to which server sockets are locally bound.
 String getProxy()
           
 boolean getPublicAddressOnly()
           
 String getServer()
           
protected  boolean handleElement(Element raw)
          
 boolean isClientEnabled()
           
 boolean isProxyEnabled()
           
 boolean isServerEnabled()
           
 void setClientEnabled(boolean enabled)
           
 void setConfigMode(String mode)
          set the config mode.
 void setInterfaceAddress(String address)
          Returns the interfaceAddr.
 void setPort(int newPort)
          Sets the port number to which server sockets are locally bound.
 void setProxy(String name)
           
 void setProxyEnabled(boolean enabled)
           
 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.Advertisement
clone, getAdvType, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getAdvertisementType

public static String getAdvertisementType()
{@inheritDoc}


handleElement

protected boolean handleElement(Element raw)


getDocument

public Document getDocument(MimeMediaType encodeAs)

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.


getInterfaceAddress

public String getInterfaceAddress()
Returns the interfaceAddr. That is, the ip of the IF to which to bind locally created sockets.

Returns:
string The address.

setInterfaceAddress

public void setInterfaceAddress(String address)
Returns the interfaceAddr. That is, the ip of the IF to which to bind locally created sockets.


getPublicAddressOnly

public boolean getPublicAddressOnly()

setPublicAddressOnly

public void setPublicAddressOnly(boolean only)

getConfigMode

public String getConfigMode()
returns the config mode. That is, how the user prefers to configure the interface address: "auto", "manual"

Returns:
string config mode

setConfigMode

public void setConfigMode(String mode)
set the config mode. That is, how the user prefers to configure the interface address: "auto", "manual" This is just a pure config item. It is never in published advs. The TCP transport strips it when it initializes.

Parameters:
mode - Can be "auto", "manual" other settings will act as the default which is "auto".

getPort

public int getPort()
Returns the port number to which server sockets are locally bound.

Returns:
String the port

setPort

public void setPort(int newPort)
Sets the port number to which server sockets are locally bound.


getProxy

public String getProxy()

getServer

public String getServer()

isProxyEnabled

public boolean isProxyEnabled()

isServerEnabled

public boolean isServerEnabled()

isClientEnabled

public boolean isClientEnabled()

setProxy

public void setProxy(String name)

setServer

public void setServer(String name)

setProxyEnabled

public void setProxyEnabled(boolean enabled)

setServerEnabled

public void setServerEnabled(boolean enabled)

setClientEnabled

public void setClientEnabled(boolean enabled)

getIndexFields

public final String[] getIndexFields()


JXTA J2SE