|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A TransportProfile is an object that contains the parameters required to initialize and establish a multicast transport session. Each transport must define at least one class that implements the TransportProfile interface. This class may have additional transport specific methods, but must support the minimal methods defined in this interface.
One common way to use a TransportProfile is for a sender to create a transport-specific object that implements TransportProfile and send it to a set of receivers via object serialization. The receivers may then use the methods of the TransportProfile interface to join the multicast transport session and receive data. Of course, there are many other ways to use a TransportProfile.
Field Summary | |
static int |
RECEIVER
A constant passed to createRM*Socket to indicate that the socket will only be used for receiving data. |
static int |
REPAIR_NODE
A constant passed to createRM*Socket to indicate that the socket will be used to start a multicast data repair node. |
static int |
SEND_RECEIVE
A constant passed to createRM*Socket to indicate that the socket will be used for sending and receiving data. |
static int |
SENDER
A constant passed to createRM*Socket to indicate that the socket will only be used for sending data. |
Method Summary | |
java.lang.Object |
clone()
Creates a new transport profile with all the attributes of the current TransportProfile. |
RMPacketSocket |
createRMPacketSocket(int sendReceive)
Creates an RMPacketSocket using this TransportProfile as input. |
RMStreamSocket |
createRMStreamSocket(int sendReceive)
Creates an RMStreamSocket using this TransportProfile as input. |
void |
disableAuthentication()
Disables the use of Authentication. |
void |
enableAuthentication()
Enables the use of authentication. |
java.net.InetAddress |
getAddress()
Returns the multicast address for this TransportProfile. |
java.lang.String |
getAuthenticationSpecFileName()
Returns the name of the authenticationSpec filename to use for initialization. |
java.lang.String |
getAuthenticationSpecPassword()
Returns the password for the authenticationSpec. |
java.lang.String |
getName()
Returns the name of this transport. |
int |
getPort()
Returns the multicast port number for this TransportProfile. |
byte |
getTTL()
Returns the time-to-live for this TransportProfile. |
boolean |
isMultiSender()
Determines if multiple senders are supported with this TransportProfile. |
boolean |
isOrdered()
Method to test if Packet Ordering option is enabled.If the application requires that the data is returned to the application in the order which it was sent, the ordered flag needs to be set. |
boolean |
isUsingAuthentication()
Returns the value of the authentication flag. |
boolean |
isValid()
Tests whether this TransportProfile is valid. |
void |
setAddress(java.net.InetAddress address)
Sets the multicast address for this TransportProfile. |
void |
setAuthenticationSpecFileName(java.lang.String specFileName)
Sets the name of the authentication Spec filename to use for initialization. |
void |
setAuthenticationSpecPassword(java.lang.String password)
Sets the password for the authentication Spec. |
void |
setMultiSender(boolean multisender)
Sets the value of the multisender flag. |
void |
setOrdered(boolean ordered)
Sets the Packet Ordering preference in the transport profile. |
void |
setPort(int port)
Sets the multicast port number for this TransportProfile. |
void |
setTTL(byte ttl)
Sets the value for the Time-to-live. |
Field Detail |
public static final int SENDER
public static final int RECEIVER
public static final int SEND_RECEIVE
public static final int REPAIR_NODE
Method Detail |
public RMStreamSocket createRMStreamSocket(int sendReceive) throws UnsupportedException, InvalidTransportProfileException, java.io.IOException, RMException
sendReceive
- indicates whether the socket created is for
sending data, receiving data, or both. Valid values are SENDER,
RECEIVER, and SEND_RECEIVE. Some transports may not support
SEND_RECEIVE.UnsupportedException
- if the transport does not
support a stream interface or does not support the specified
sendReceive value.InvalidTransportProfileException
- if the TransportProfile
is not validjava.io.IOException
- if an I/O exception occursRMException
- if a reliable-multicast-related exception occurspublic RMPacketSocket createRMPacketSocket(int sendReceive) throws UnsupportedException, InvalidTransportProfileException, java.io.IOException, RMException
sendReceive
- indicates whether the socket created is for
sending data, receiving data, or both. Valid values are SENDER,
RECEIVER, and SEND_RECEIVE. Some transports may not support
SEND_RECEIVE.UnsupportedException
- if the transport does not
support a packet interface or does not support the specified
sendReceive value.InvalidTransportProfileException
- if the TransportProfile
is not validjava.io.IOException
- if an I/O exception occursRMException
- if a reliable-multicast-related exception occurspublic java.lang.String getName()
public java.net.InetAddress getAddress()
public int getPort()
public byte getTTL()
public java.lang.String getAuthenticationSpecFileName()
public java.lang.String getAuthenticationSpecPassword()
public boolean isMultiSender()
public boolean isOrdered()
public boolean isUsingAuthentication()
public void setAddress(java.net.InetAddress address) throws InvalidMulticastAddressException, RMException
address
- the new multicast address.InvalidMulticastAddressException
- if an
the address specified is not a multicast address.RMException
- if a reliable-multicast-related exception occurspublic void setPort(int port) throws RMException
port
- the new multicast port number.RMException
- if a reliable-multicast-related exception occurspublic void setOrdered(boolean ordered) throws RMException
ordered
- the new value of the ordered flag.RMException
- if a reliable-multicast-related exception occurspublic void setTTL(byte ttl) throws RMException
ttl
- the value of the time-to-live parameter.RMException
- if a reliable-multicast-related exception occurspublic void setMultiSender(boolean multisender) throws UnsupportedException, RMException
multisender
- true if the application wishes to support
multiple senders; false otherwiseUnsupportedException
- if the transport does not
support multiple senders.RMException
- if a reliable-multicast-related exception occurspublic boolean isValid()
true
if the TransportProfile is valid;
false
otherwisepublic java.lang.Object clone()
clone
in class java.lang.Object
public void enableAuthentication()
public void disableAuthentication()
public void setAuthenticationSpecFileName(java.lang.String specFileName)
specFileName
- Authentication Spec file name.public void setAuthenticationSpecPassword(java.lang.String password)
password
- Authentication Spec password.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.