|
Project 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.TCPAdv
Provides configuration parameters for the JXTA TCP Message Transport.
Nested Class Summary | |
static class |
TCPAdv.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()
|
String |
getConfigMode()
returns the config mode. |
Document |
getDocument(MimeMediaType encodeAs)
|
int |
getEndPort()
Return the highest port on which the TCP Transport will listen if configured to do so. |
String[] |
getIndexFields()
|
String |
getInterfaceAddress()
Returns the interface which the TCP transport will use. |
String |
getMulticastAddr()
returns the multicastaddr |
int |
getMulticastPort()
returns the multicastport |
int |
getMulticastSize()
returns the multicastsize |
boolean |
getMulticastState()
Determine whether multicast if off or not |
int |
getPort()
Returns the port on which the TCP Transport will listen if configured to do so. |
boolean |
getPublicAddressOnly()
Returns the state of whether to only use public address returns boolean true if set to use "Public Address Only" |
String |
getServer()
Returns the public address |
int |
getStartPort()
Return the lowest port on which the TCP Transport will listen if configured to do so. |
protected boolean |
handleElement(Element raw)
|
boolean |
isClientEnabled()
Returns the configuration for outbound connections. |
boolean |
isServerEnabled()
Returns the configuration for inbound connections. |
void |
setClientEnabled(boolean enabled)
Sets the configuration for outbound connections. |
void |
setConfigMode(String mode)
set the config mode. |
void |
setEndPort(int end)
Sets the highest port on which the TCP Transport will listen if configured to do so. |
void |
setInterfaceAddress(String ia)
Sets the interface which the TCP transport will use. |
void |
setMulticastAddr(String multicastaddr)
set the multicastaddr |
void |
setMulticastPort(int multicastport)
set the multicastport |
void |
setMulticastSize(int multicastsize)
set the multicastsize |
void |
setMulticastState(boolean newState)
Enable or disable multicast. |
void |
setPort(int port)
Sets the port on which the TCP Transport will listen if configured to do so. |
void |
setPublicAddressOnly(boolean only)
Sets the state of whether to only use public address |
void |
setServer(String address)
Set the public address. |
void |
setServerEnabled(boolean enabled)
Sets the configuration for inbound connections. |
void |
setStartPort(int start)
Sets the lowest port on which the TCP Transport will listen if configured to do so. |
Methods inherited from class net.jxta.protocol.TransportAdvertisement |
getBaseAdvType, getID, getProtocol, setProtocol |
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
Advertiement.getAdvertisementType() no matter what the real type of the
advertisment.
public String getAdvType()
public String getInterfaceAddress()
public void setInterfaceAddress(String ia)
ia
- The interface to use. May be a DNS name or an IP Address.public int getPort()
-1
, 0
and 1-65535
.
The -1
value is used to signify that there is no port
preference and any port in range will be used. The 0
specifies that the Socket API dynamic port allocation should be used.
For values 1-65535
the value specifies the required port on
which the TCP tranport will listen.
public void setPort(int port)
-1
, 0
and 1-65535
.
The -1
value is used to signify that there is no port
preference and any port in range will be used. The 0
specifies that the Socket API dynamic port allocation should be used.
For values 1-65535
the value specifies the required port on
which the TCP tranport will listen.
port
- the port on which to listen.public int getStartPort()
-1
, 0
and
1-65535
. The -1
value is used to signify that
the port range feature should be disabled. The 0
specifies
that the Socket API dynamic port allocation should be used. For values
1-65535
the value must be equal to or less than the value
used for end port.
public void setStartPort(int start)
-1
, 0
and
1-65535
. The -1
value is used to signify that
the port range feature should be disabled. The 0
specifies
that the Socket API dynamic port allocation should be used. For values
1-65535
the value must be equal to or less than the value
used for end port.
start
- the lowest port on which to listen.public int getEndPort()
-1
, 0
and
1-65535
. The -1
value is used to signify that
the port range feature should be disabled. The 0
specifies
that the Socket API dynamic port allocation should be used. For values
1-65535
the value must be equal to or greater than the value
used for start port.
public void setEndPort(int end)
-1
, 0
and
1-65535
. The -1
value is used to signify that
the port range feature should be disabled. The 0
specifies
that the Socket API dynamic port allocation should be used. For values
1-65535
the value must be equal to or greater than the value
used for start port.
public boolean getMulticastState()
public void setMulticastState(boolean newState)
public String getMulticastAddr()
public void setMulticastAddr(String multicastaddr)
multicastaddr
- set multicastaddrpublic int getMulticastPort()
public void setMulticastPort(int multicastport)
multicastport
- set multicastportpublic int getMulticastSize()
public void setMulticastSize(int multicastsize)
multicastsize
- set multicast sizepublic String getServer()
public void setServer(String address)
address
- addresspublic boolean isClientEnabled()
true
if outbound connections are allowed otherwise
false
public void setClientEnabled(boolean enabled)
enabled
- true
if outbound connections are allowed otherwise
false
public boolean isServerEnabled()
true
if inbound connections are allowed otherwise
false
public void setServerEnabled(boolean enabled)
enabled
- true
if inbound connections are allowed otherwise
false
public String getConfigMode()
public void setConfigMode(String mode)
mode
- Can be "auto", "manual" other settings will act as the default
which is "auto".public boolean getPublicAddressOnly()
public void setPublicAddressOnly(boolean only)
only
- true to use "Public Address Only"protected boolean handleElement(Element raw)
public Document getDocument(MimeMediaType encodeAs)
public final String[] getIndexFields()
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |