com.sun.multicast.reliable.channel
Interface Channel

All Superinterfaces:
java.rmi.Remote

public interface Channel
extends java.rmi.Remote

A reliable multicast channel. Several different implementations of the Channel interface are provided, depending on whether it's local or remote. To get a Channel object, use ChannelManager.getChannel() or ChannelManager.createChannel().

See Also:
ChannelManager

Field Summary
static int CHANNEL_FIELD_ABSTRACT
          A constant used in a ChannelChangedEvent to indicate that the abstract has changed.
static int CHANNEL_FIELD_ADDITIONAL_ADVERTISED_DATA
          A constant used in a ChannelChangedEvent to indicate that the additional advertised data has changed.
static int CHANNEL_FIELD_ADDITIONAL_UNADVERTISED_DATA
          A constant used in a ChannelChangedEvent to indicate that the additional unadvertised data has changed.
static int CHANNEL_FIELD_ADVERTISEMENT_ADDRESS
          A constant used in a ChannelChangedEvent to indicate that the advertisement address has changed.
static int CHANNEL_FIELD_ADVERTISING_REQUESTED
          A constant used in a ChannelChangedEvent to indicate that the advertising requested flag has changed.
static int CHANNEL_FIELD_APPLICATION_NAME
          A constant used in a ChannelChangedEvent to indicate that the application name has changed.
static int CHANNEL_FIELD_CHANNEL_NAME
          A constant used in a ChannelChangedEvent to indicate that the channel name has changed.
static int CHANNEL_FIELD_CIPHER_MODE
          A constant used in a ChannelChangedEvent to indicate that the enabled flag has changed.
static int CHANNEL_FIELD_CONTACT_NAME
          A constant used in a ChannelChangedEvent to indicate that the contact name has changed.
static int CHANNEL_FIELD_DATA_END_TIME
          A constant used in a ChannelChangedEvent to indicate that the data end time has changed.
static int CHANNEL_FIELD_DATA_START_TIME
          A constant used in a ChannelChangedEvent to indicate that the data start time has changed.
static int CHANNEL_FIELD_ENABLED
          A constant used in a ChannelChangedEvent to indicate that the enabled flag has changed.
static int CHANNEL_FIELD_MAXIMUM_SPEED
          A constant used in a ChannelChangedEvent to indicate that the maximum speed has changed.
static int CHANNEL_FIELD_MINIMUM_SPEED
          A constant used in a ChannelChangedEvent to indicate that the minimum speed has changed.
static int CHANNEL_FIELD_MULTIPLE_SENDERS_ALLOWED
          A constant used in a ChannelChangedEvent to indicate that the multiple senders allowed flag has changed.
static int CHANNEL_FIELD_SESSION_END_TIME
          A constant used in a ChannelChangedEvent to indicate that the session end time has changed.
static int CHANNEL_FIELD_TRANSPORT_PROFILE
          A constant used in a ChannelChangedEvent to indicate that the transport profile has changed.
 
Method Summary
 void addChannelChangeListener(com.sun.multicast.reliable.channel.ChannelChangeListener listener)
          Add a ChannelChangeListener to the listener list.
 com.sun.multicast.reliable.channel.ChannelRMPacketSocket createRMPacketSocket(int sendReceive)
          Creates a ChannelRMPacketSocket for sending and/or receiving on the channel.
 com.sun.multicast.reliable.channel.ChannelRMPacketSocket createRMPacketSocket(TransportProfile tp, int sendReceive)
          Creates a ChannelRMPacketSocket for sending and/or receiving on the channel.
 com.sun.multicast.reliable.channel.ChannelRMStreamSocket createRMStreamSocket(int sendReceive)
          Creates a ChannelRMStreamSocket for sending and/or receiving on the channel.
 com.sun.multicast.reliable.channel.ChannelRMStreamSocket createRMStreamSocket(TransportProfile tp, int sendReceive)
          Creates a ChannelRMStreamSocket for sending and/or receiving on the channel.
 void destroy()
          Destroys the Channel.
 void disableCipher()
          Disables the use of cipher functionality.
 Channel duplicate()
          Duplicates the Channel.
 void enableCipher()
          Enables the use of cipher functionality.
 java.lang.String getAbstract()
          Gets an optional field containing an abstract describing the channel.
 java.lang.String getAdditionalAdvertisedData()
          Gets an optional field for additional channel-specific data to be included in advertisements.
 java.lang.String getAdditionalUnadvertisedData()
          Gets an optional field for additional channel-specific data to be included in the channel, but not included in advertisements.
 java.net.InetAddress getAdvertisementAddress()
          Returns the multicast address used for advertisements.
 long getAdvertisementCount()
          Gets the count of times the channel has been advertised.
 java.util.Date getAdvertisementTimestamp()
          Gets the time the channel was last advertised.
 boolean getAdvertisingRequested()
          Tests if channel advertising has been requested.
 java.lang.String getApplicationName()
          Returns the channel's application name.
 long getChannelID()
          Gets the channel ID (a long that identifies the channel uniquely, at least within the ChannelManager).
 java.lang.String getChannelName()
          Returns the channel name.
 java.lang.String getCipherSpecFileName()
          gets the name of the specification file that is to be used to initialize the Cipher.
 java.lang.String getContactName()
          Gets an optional field containing a contact name for the channel.
 java.util.Date getCreationTime()
          Gets the time the channel was created.
 int getCurrentAdvertisementInterval()
          Gets the number of seconds between the last two advertisements.
 java.util.Date getDataEndTime()
          Gets a copy of the channel's data end time.
 java.util.Date getDataStartTime()
          Gets a copy of the channel's data start time.
 java.util.Vector getDynamicFilterList()
          Returns a deep copy of the channel's list of dynamic filters.
 java.util.Date getExpirationTime()
          Gets a copy of the channel's expiration time.
 int getLeadTime()
          Gets the channel's suggested registration lead time.
 int getLeadTimeRandomInterval()
          Gets the channel's suggested registration randomizer interval.
 int getMaximumSpeed()
          Gets the maximum speed at which channel sends data in bits per second.
 int getMinimumSpeed()
          Gets the minimum speed at which channel sends data in bits per second.
 java.util.Date getSessionEndTime()
          Gets a copy of the channel's session end time.
 TransportProfile getTransportProfile()
          Returns a copy of the channel's TransportProfile.
 int getTransportReceiverCount()
          Gets the number of receivers connected to the transport.
 boolean isAdvertising()
          Tests if the channel is being advertised.
 boolean isEnabled()
          Tests whether the channel is enabled.
 boolean isMultipleSendersAllowed()
          Tests if multiple senders are allowed on this channel.
 boolean isUsingCipher()
          Test method to check if the cipher functionality is being used.
 boolean isValid()
          Tests whether the channel is valid.
 void removeChannelChangeListener(com.sun.multicast.reliable.channel.ChannelChangeListener listener)
          Remove a ChannelChangeListener from the listener list.
 void setAbstract(java.lang.String data)
          Sets an optional field containing an abstract describing the channel.
 void setAdditionalAdvertisedData(java.lang.String data)
          Sets an optional field for additional channel-specific data to be included in advertisements.
 void setAdditionalUnadvertisedData(java.lang.String data)
          Sets an optional field for additional channel-specific data to be included in the channel, but not included in advertisements.
 void setAdvertisementAddress(java.net.InetAddress address)
          Sets the requested multicast address to be used for advertisements.
 void setAdvertisingRequested(boolean newAdvertising)
          Sets whether channel advertising is requested.
 void setApplicationName(java.lang.String name)
          Sets the channel's application name.
 void setChannelName(java.lang.String name)
          Sets the channel name.
 void setCipherSpecFileName(java.lang.String cipherSpecFileName)
          sets the name of the specification file that is to be used to initialize the Cipher.
 void setContactName(java.lang.String data)
          Sets an optional field containing a contact name for the channel.
 void setDataEndTime(java.util.Date endTime)
          Sets the channel's data end time.
 void setDataStartTime(java.util.Date startTime)
          Sets the channel's data start time.
 void setDynamicFilterList(java.util.Vector list)
          Sets the channel's dynamic filter list.
 void setEnabled(boolean b)
          Sets whether the channel is enabled.
 void setExpirationTime(java.util.Date expirationTime)
          Sets the channel's expiration time.
 void setLeadTime(int leadTime)
          Sets the channel's suggested registration lead time.
 void setLeadTimeRandomInterval(int interval)
          Sets the channel's suggested registration randomizer interval.
 void setMaximumSpeed(int speed)
          Sets the maximum speed at which channel sends data in bits per second.
 void setMinimumSpeed(int speed)
          Sets the minimum speed at which channel sends data in bits per second.
 void setMultipleSendersAllowed(boolean multiple)
          Sets if multiple senders are allowed on this channel.
 void setSessionEndTime(java.util.Date endTime)
          Sets the channel's session end time.
 void setTransportProfile(TransportProfile profile)
          Sets the channel's transport profile.
 void validate()
          Throws an exception if the channel is not valid.
 

Field Detail

CHANNEL_FIELD_CHANNEL_NAME

public static final int CHANNEL_FIELD_CHANNEL_NAME
A constant used in a ChannelChangedEvent to indicate that the channel name has changed.

CHANNEL_FIELD_APPLICATION_NAME

public static final int CHANNEL_FIELD_APPLICATION_NAME
A constant used in a ChannelChangedEvent to indicate that the application name has changed.

CHANNEL_FIELD_TRANSPORT_PROFILE

public static final int CHANNEL_FIELD_TRANSPORT_PROFILE
A constant used in a ChannelChangedEvent to indicate that the transport profile has changed.

CHANNEL_FIELD_DATA_START_TIME

public static final int CHANNEL_FIELD_DATA_START_TIME
A constant used in a ChannelChangedEvent to indicate that the data start time has changed.

CHANNEL_FIELD_DATA_END_TIME

public static final int CHANNEL_FIELD_DATA_END_TIME
A constant used in a ChannelChangedEvent to indicate that the data end time has changed.

CHANNEL_FIELD_SESSION_END_TIME

public static final int CHANNEL_FIELD_SESSION_END_TIME
A constant used in a ChannelChangedEvent to indicate that the session end time has changed.

CHANNEL_FIELD_MINIMUM_SPEED

public static final int CHANNEL_FIELD_MINIMUM_SPEED
A constant used in a ChannelChangedEvent to indicate that the minimum speed has changed.

CHANNEL_FIELD_MAXIMUM_SPEED

public static final int CHANNEL_FIELD_MAXIMUM_SPEED
A constant used in a ChannelChangedEvent to indicate that the maximum speed has changed.

CHANNEL_FIELD_ADDITIONAL_ADVERTISED_DATA

public static final int CHANNEL_FIELD_ADDITIONAL_ADVERTISED_DATA
A constant used in a ChannelChangedEvent to indicate that the additional advertised data has changed.

CHANNEL_FIELD_ADDITIONAL_UNADVERTISED_DATA

public static final int CHANNEL_FIELD_ADDITIONAL_UNADVERTISED_DATA
A constant used in a ChannelChangedEvent to indicate that the additional unadvertised data has changed.

CHANNEL_FIELD_ABSTRACT

public static final int CHANNEL_FIELD_ABSTRACT
A constant used in a ChannelChangedEvent to indicate that the abstract has changed.

CHANNEL_FIELD_CONTACT_NAME

public static final int CHANNEL_FIELD_CONTACT_NAME
A constant used in a ChannelChangedEvent to indicate that the contact name has changed.

CHANNEL_FIELD_ADVERTISING_REQUESTED

public static final int CHANNEL_FIELD_ADVERTISING_REQUESTED
A constant used in a ChannelChangedEvent to indicate that the advertising requested flag has changed.

CHANNEL_FIELD_ADVERTISEMENT_ADDRESS

public static final int CHANNEL_FIELD_ADVERTISEMENT_ADDRESS
A constant used in a ChannelChangedEvent to indicate that the advertisement address has changed.

CHANNEL_FIELD_MULTIPLE_SENDERS_ALLOWED

public static final int CHANNEL_FIELD_MULTIPLE_SENDERS_ALLOWED
A constant used in a ChannelChangedEvent to indicate that the multiple senders allowed flag has changed.

CHANNEL_FIELD_ENABLED

public static final int CHANNEL_FIELD_ENABLED
A constant used in a ChannelChangedEvent to indicate that the enabled flag has changed.

CHANNEL_FIELD_CIPHER_MODE

public static final int CHANNEL_FIELD_CIPHER_MODE
A constant used in a ChannelChangedEvent to indicate that the enabled flag has changed.
Method Detail

destroy

public void destroy()
             throws RMException,
                    java.rmi.RemoteException
Destroys the Channel. This causes all ChannelManagers to forget about the Channel. The transport should not be active when destroy is called.
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

duplicate

public Channel duplicate()
                  throws LimitExceededException,
                         RMException,
                         java.rmi.RemoteException
Duplicates the Channel. Creates a new channel exactly like this one, but with a new channel ID.
Returns:
the new channel
Throws:
LimitExceededException - if the PCM's channel limit has been reached
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

validate

public void validate()
              throws InvalidChannelException,
                     RMException,
                     java.rmi.RemoteException
Throws an exception if the channel is not valid. A channel is valid if, as far as can be determined, the channel could be used to send and receive data (subject to access control restrictions).

Possible causes for invalid channels include not providing a transport profile or requesting support for multiple senders and providing a transport profile that cannot support this.

Throws:
InvalidChannelException - if the channel is not valid
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

createRMStreamSocket

public com.sun.multicast.reliable.channel.ChannelRMStreamSocket createRMStreamSocket(int sendReceive)
                                                                              throws RMException,
                                                                                     java.io.IOException,
                                                                                     java.rmi.RemoteException,
                                                                                     UnsupportedException
Creates a ChannelRMStreamSocket for sending and/or receiving on the channel.
Parameters:
sendReceive - indicates whether this socket is to be used for transmitting or receiving data. Valid input is TransportProfile.SENDER, TransportProfile.RECEIVER, or TransportProfile.SEND_RECEIVE.
Returns:
a new ChannelRMStreamSocket
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs
UnsupportedException - if the underlying transport does not support a stream interface.

createRMStreamSocket

public com.sun.multicast.reliable.channel.ChannelRMStreamSocket createRMStreamSocket(TransportProfile tp,
                                                                                     int sendReceive)
                                                                              throws RMException,
                                                                                     java.io.IOException,
                                                                                     java.rmi.RemoteException,
                                                                                     UnsupportedException
Creates a ChannelRMStreamSocket for sending and/or receiving on the channel.
Parameters:
tp - a transport profile to use in creating the socket. Great care must be taken when supplying a modified transport profile to a channel that already has one defined. Some modifications to the profile may prohibit communication with other members of the group.
sendReceive - indicates whether this socket is to be used for transmitting or receiving data. Valid input is TransportProfile.SENDER, TransportProfile.RECEIVER, or TransportProfile.SEND_RECEIVE.
Returns:
a new ChannelRMStreamSocket
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs
UnsupportedException - if the underlying transport does not support a stream interface.

createRMPacketSocket

public com.sun.multicast.reliable.channel.ChannelRMPacketSocket createRMPacketSocket(int sendReceive)
                                                                              throws RMException,
                                                                                     java.rmi.RemoteException,
                                                                                     java.io.IOException,
                                                                                     UnsupportedException
Creates a ChannelRMPacketSocket for sending and/or receiving on the channel.
Parameters:
sendReceive - indicates whether this socket is to be used for transmitting or receiving data. Valid input is TransportProfile.SENDER, TransportProfile.RECEIVER, or TransportProfile.SEND_RECEIVE.
Returns:
a new ChannelRMPacketSocket
Throws:
RMException - if a reliable-multicast-related exception occurs
java.io.IOException - if an I/O error occurs
java.rmi.RemoteException - if an RMI-related exception occurs
UnsupportedException - if the underlying transport does not support a packet interface.

createRMPacketSocket

public com.sun.multicast.reliable.channel.ChannelRMPacketSocket createRMPacketSocket(TransportProfile tp,
                                                                                     int sendReceive)
                                                                              throws RMException,
                                                                                     java.rmi.RemoteException,
                                                                                     java.io.IOException,
                                                                                     UnsupportedException
Creates a ChannelRMPacketSocket for sending and/or receiving on the channel.
Parameters:
tp - a transport profile to use in creating the socket. Great care must be taken when supplying a modified transport profile to a channel that already has one defined. Some modifications to the profile may prohibit communication with other members of the group.
sendReceive - indicates whether this socket is to be used for transmitting or receiving data. Valid input is TransportProfile.SENDER, TransportProfile.RECEIVER, or TransportProfile.SEND_RECEIVE.
Returns:
a new ChannelRMPacketSocket
Throws:
RMException - if a reliable-multicast-related exception occurs
java.io.IOException - if an I/O error occurs
java.rmi.RemoteException - if an RMI-related exception occurs
UnsupportedException - if the underlying transport does not support a packet interface.

addChannelChangeListener

public void addChannelChangeListener(com.sun.multicast.reliable.channel.ChannelChangeListener listener)
                              throws RMException,
                                     java.rmi.RemoteException
Add a ChannelChangeListener to the listener list.
Parameters:
listener - the listener to be added
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

removeChannelChangeListener

public void removeChannelChangeListener(com.sun.multicast.reliable.channel.ChannelChangeListener listener)
                                 throws RMException,
                                        java.rmi.RemoteException
Remove a ChannelChangeListener from the listener list.
Parameters:
listener - the listener to be removed
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setChannelName

public void setChannelName(java.lang.String name)
                    throws RMException,
                           java.rmi.RemoteException
Sets the channel name. null means unknown or unspecified.
Parameters:
name - the new channel name
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setApplicationName

public void setApplicationName(java.lang.String name)
                        throws RMException,
                               java.rmi.RemoteException
Sets the channel's application name. null means unknown or unspecified.
Parameters:
name - the new application name
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setTransportProfile

public void setTransportProfile(TransportProfile profile)
                         throws InvalidChannelException,
                                RMException,
                                java.rmi.RemoteException
Sets the channel's transport profile. Because the Channel object may be remote, the channel actually makes a copy of the TransportProfile provided and uses that. null means unknown or unspecified.
Parameters:
profile - the new transport profile
Throws:
InvalidChannelException - if the channel is enabled and this would cause it to become invalid
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setDataStartTime

public void setDataStartTime(java.util.Date startTime)
                      throws RMException,
                             java.rmi.RemoteException
Sets the channel's data start time. This date need not be set and if set is only advisory. Data transmission may start at any time at the discretion of the channel's sender(s). Because the channel may be remote, the channel actually makes a copy of the Date provided and uses that. null means unknown or unspecified.
Parameters:
startTime - the new data start time
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setDataEndTime

public void setDataEndTime(java.util.Date endTime)
                    throws RMException,
                           java.rmi.RemoteException
Sets the channel's data end time. This date need not be set and if set is only advisory. Data transmission may end at any time at the discretion of the channel's sender(s). Because the channel may be remote, the channel actually makes a copy of the Date provided and uses that. null means unknown or unspecified.
Parameters:
endTime - the new data end time
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setSessionEndTime

public void setSessionEndTime(java.util.Date endTime)
                       throws RMException,
                              java.rmi.RemoteException
Sets the channel's session end time. This is a time by which the multicast transport session associated with a channel is expected to end. This date need not be set and if set is only advisory. Because the channel may be remote, the channel actually makes a copy of the Date provided and uses that. null means unknown or unspecified.
Parameters:
endTime - the new session end time
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setLeadTime

public void setLeadTime(int leadTime)
                 throws RMException,
                        java.rmi.RemoteException
Sets the channel's suggested registration lead time. This is the time before the data start time at which receivers may begin to register. This value need not be set and if set is only advisory.
Parameters:
leadTime - lead time in seconds
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setLeadTimeRandomInterval

public void setLeadTimeRandomInterval(int interval)
                               throws RMException,
                                      java.rmi.RemoteException
Sets the channel's suggested registration randomizer interval. This value specifies the period of time after the registration lead time over which registrations should be spread in order to spread out channel registration activity. This value need not be set and if set is only advisory.
Parameters:
interval - randomizer interval in seconds
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setExpirationTime

public void setExpirationTime(java.util.Date expirationTime)
                       throws RMException,
                              java.rmi.RemoteException
Sets the channel's expiration time. This is a time at which these channel characteristics expire. The receiver should have reregistered before this time and begun using the new characteristics received during reregistration. This date need not be set and if set is only advisory. Because the channel may be remote, the channel actually makes a copy of the Date provided and uses that. null means unknown or unspecified.
Parameters:
expirationTime - the new channel expiration time
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setMinimumSpeed

public void setMinimumSpeed(int speed)
                     throws RMException,
                            java.rmi.RemoteException
Sets the minimum speed at which channel sends data in bits per second. This speed need not be set and if set is only advisory. 0 means unknown or unspecified.

The actual speed of delivery will vary over the transmission and may actually drop below this value at any given time for a given receiver, especially if the sender is sending more than one channel over the same multicast address.

Parameters:
speed - the new minimum speed
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setMaximumSpeed

public void setMaximumSpeed(int speed)
                     throws RMException,
                            java.rmi.RemoteException
Sets the maximum speed at which channel sends data in bits per second. This speed need not be set and if set is only advisory. 0 means unknown or unspecified.

The actual speed of delivery will vary over the transmission and may actually rise above this value at any given time for a given receiver, especially if the sender is sending more than one channel over the same multicast address.

Parameters:
speed - the new minimum speed
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setAdditionalAdvertisedData

public void setAdditionalAdvertisedData(java.lang.String data)
                                 throws RMException,
                                        java.rmi.RemoteException
Sets an optional field for additional channel-specific data to be included in advertisements. As much of this field as possible is included in advertisements, up to about 600 bytes. null means unknown or unspecified.
Parameters:
data - the new additional advertised data
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setAdditionalUnadvertisedData

public void setAdditionalUnadvertisedData(java.lang.String data)
                                   throws RMException,
                                          java.rmi.RemoteException
Sets an optional field for additional channel-specific data to be included in the channel, but not included in advertisements. null means unknown or unspecified.
Parameters:
data - the new additional unadvertised data
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setAbstract

public void setAbstract(java.lang.String data)
                 throws RMException,
                        java.rmi.RemoteException
Sets an optional field containing an abstract describing the channel. As much of this field as possible is included in advertisements, up to about 600 bytes. null means unknown or unspecified.
Parameters:
data - the new abstract
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setContactName

public void setContactName(java.lang.String data)
                    throws RMException,
                           java.rmi.RemoteException
Sets an optional field containing a contact name for the channel. null means unknown or unspecified.
Parameters:
data - the new contact name
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setEnabled

public void setEnabled(boolean b)
                throws InvalidChannelException,
                       RMException,
                       java.rmi.RemoteException
Sets whether the channel is enabled. Disabled channels are not accessible to anyone without administrator access. Enabled channels must be valid (as described under the validate method).
Parameters:
b - if true, enable the channel; otherwise, disable it
Throws:
InvalidChannelException - if the channel is invalid and enabling was requested
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setAdvertisingRequested

public void setAdvertisingRequested(boolean newAdvertising)
                             throws RMException,
                                    java.rmi.RemoteException
Sets whether channel advertising is requested.

NOTE: A channel is only advertised if it is enabled and channel advertising has been requested.

Parameters:
advertising - true if the channel should be advertised; false otherwise
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setAdvertisementAddress

public void setAdvertisementAddress(java.net.InetAddress address)
                             throws RMException,
                                    java.io.IOException,
                                    java.rmi.RemoteException
Sets the requested multicast address to be used for advertisements. The value null means use the default advertisement address. Note that the TTL used for advertisements is the same as that specified in the TransportProfile.
Parameters:
address - the new multicast address
Throws:
RMException - if a reliable-multicast-related exception occurs
java.io.IOException - if the address is not a multicast address
java.rmi.RemoteException - if an RMI-related exception occurs

setMultipleSendersAllowed

public void setMultipleSendersAllowed(boolean multiple)
                               throws InvalidChannelException,
                                      RMException,
                                      java.rmi.RemoteException
Sets if multiple senders are allowed on this channel.
Parameters:
multiple - true if multiple senders should be allowed on this channel; false otherwise
Throws:
InvalidChannelException - if the channel is enabled and this would cause it to become invalid
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

setDynamicFilterList

public void setDynamicFilterList(java.util.Vector list)
                          throws RMException,
                                 java.rmi.RemoteException
Sets the channel's dynamic filter list. Because the Channel object may be remote, the channel actually makes a deep copy of the list provided and uses that. null means none.

The dynamic filters in this list are passed to the receiver, where they are connected together using their setDataSource methods. The first dynamic filter in the list is applied to the data last.

Parameters:
list - the new dynamic filter list
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getChannelName

public java.lang.String getChannelName()
                                throws RMException,
                                       java.rmi.RemoteException
Returns the channel name. null means unknown or unspecified.
Returns:
the channel name
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getApplicationName

public java.lang.String getApplicationName()
                                    throws RMException,
                                           java.rmi.RemoteException
Returns the channel's application name. null means unknown or unspecified.
Returns:
the channel's application name
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getTransportProfile

public TransportProfile getTransportProfile()
                                     throws RMException,
                                            java.rmi.RemoteException
Returns a copy of the channel's TransportProfile. Because the profile returned is a copy of the channel's TransportProfile, it will not be updated if the channel's TransportProfile changes. Likewise, changing it will not affect the channel (unless Channel.setTransportProfile() is called). null means unknown or unspecified.
Returns:
a copy of the channel's TransportProfile
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getDataStartTime

public java.util.Date getDataStartTime()
                                throws RMException,
                                       java.rmi.RemoteException
Gets a copy of the channel's data start time. This date need not be set and if set is only advisory. Data transmission may start at any time at the discretion of the channel's sender(s). Because the Date object returned is a copy of the channel's data start time, it will not be updated if the channel's data start time changes. Likewise, changing it will not affect the channel (unless Channel.setDataStartTime() is called). null means unknown or unspecified.
Returns:
the data start time (null means none has been set)
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getDataEndTime

public java.util.Date getDataEndTime()
                              throws RMException,
                                     java.rmi.RemoteException
Gets a copy of the channel's data end time. This date need not be set and if set is only advisory. Data transmission may end at any time at the discretion of the channel's sender(s). Because the Date object returned is a copy of the channel's data end time, it will not be updated if the channel's data end time changes. Likewise, changing it will not affect the channel (unless Channel.setDataEndTime() is called). null means unknown or unspecified.
Returns:
the data end time (null means none has been set)
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getSessionEndTime

public java.util.Date getSessionEndTime()
                                 throws RMException,
                                        java.rmi.RemoteException
Gets a copy of the channel's session end time. This is a time by which the multicast transport session associated with a channel is expected to end. This date need not be set and if set is only advisory. Because the Date object returned is a copy of the channel's session end time, it will not be updated if the channel's session end time changes. Likewise, changing it will not affect the channel (unless Channel.setSessionEndTime() is called). null means unknown or unspecified.
Returns:
the session end time (null means none has been set)
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getLeadTime

public int getLeadTime()
                throws RMException,
                       java.rmi.RemoteException
Gets the channel's suggested registration lead time. This is the time before the data start time at which receivers may begin to register. This value need not be set and if set is only advisory.
Returns:
lead time in seconds
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getLeadTimeRandomInterval

public int getLeadTimeRandomInterval()
                              throws RMException,
                                     java.rmi.RemoteException
Gets the channel's suggested registration randomizer interval. This value specifies the period of time after the registration lead time over which registrations should be spread in order to spread out channel registration activity. This value need not be set and if set is only advisory.
Returns:
randomizer interval in seconds
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getExpirationTime

public java.util.Date getExpirationTime()
                                 throws RMException,
                                        java.rmi.RemoteException
Gets a copy of the channel's expiration time. This is a time at which these channel characteristics expire. The receiver should have reregistered before this time and begun using the new characteristics received during reregistration. This date need not be set and if set is only advisory. Because the Date object returned is a copy of the channel's data end time, it will not be updated if the channel's data end time changes. Likewise, changing it will not affect the channel (unless Channel.setExpirationTime() is called). null means unknown or unspecified.
Returns:
a copy of the channel expiration time
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getMinimumSpeed

public int getMinimumSpeed()
                    throws RMException,
                           java.rmi.RemoteException
Gets the minimum speed at which channel sends data in bits per second. This speed need not be set and if set is only advisory. 0 means unknown or unspecified.

The actual speed of delivery will vary over the transmission and may actually drop below this value at any given time for a given receiver, especially if the sender is sending more than one channel over the same multicast address.

Returns:
the minimum speed
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getMaximumSpeed

public int getMaximumSpeed()
                    throws RMException,
                           java.rmi.RemoteException
Gets the maximum speed at which channel sends data in bits per second. This speed need not be set and if set is only advisory. 0 means unknown or unspecified.

The actual speed of delivery will vary over the transmission and may actually rise above this value at any given time for a given receiver, especially if the sender is sending more than one channel over the same multicast address.

Returns:
the minimum speed
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getAdditionalAdvertisedData

public java.lang.String getAdditionalAdvertisedData()
                                             throws RMException,
                                                    java.rmi.RemoteException
Gets an optional field for additional channel-specific data to be included in advertisements. null means unknown or unspecified.
Returns:
the additional advertised data
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getAdditionalUnadvertisedData

public java.lang.String getAdditionalUnadvertisedData()
                                               throws RMException,
                                                      java.rmi.RemoteException
Gets an optional field for additional channel-specific data to be included in the channel, but not included in advertisements. null means unknown or unspecified.
Returns:
the additional unadvertised data
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getAbstract

public java.lang.String getAbstract()
                             throws RMException,
                                    java.rmi.RemoteException
Gets an optional field containing an abstract describing the channel. null means unknown or unspecified.
Returns:
the abstract
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getContactName

public java.lang.String getContactName()
                                throws RMException,
                                       java.rmi.RemoteException
Gets an optional field containing a contact name for the channel. null means unknown or unspecified.
Returns:
the contact name
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getAdvertisingRequested

public boolean getAdvertisingRequested()
                                throws RMException,
                                       java.rmi.RemoteException
Tests if channel advertising has been requested.
Returns:
true if channel advertising has been requested; false otherwise
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getAdvertisementAddress

public java.net.InetAddress getAdvertisementAddress()
                                             throws RMException,
                                                    java.rmi.RemoteException
Returns the multicast address used for advertisements. The value null means use the default advertisement address.
Returns:
the multicast address used for advertisements
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

isMultipleSendersAllowed

public boolean isMultipleSendersAllowed()
                                 throws RMException,
                                        java.rmi.RemoteException
Tests if multiple senders are allowed on this channel.
Returns:
true if multiple senders are allowed on this channel; false otherwise
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getDynamicFilterList

public java.util.Vector getDynamicFilterList()
                                      throws RMException,
                                             java.rmi.RemoteException
Returns a deep copy of the channel's list of dynamic filters. Because the list returned is a copy of the channel's list, it will not be updated if the channel's list changes. Likewise, changing the list or changing the dynamic filters in the list will not affect the channel (unless Channel.setDynamicFilters() is called). null means none.
Returns:
a copy of the channel's dynamic filter list
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

isEnabled

public boolean isEnabled()
                  throws RMException,
                         java.rmi.RemoteException
Tests whether the channel is enabled. Disabled channels are not accessible to anyone without administrator access. Enabled channels must be valid (as described under the validate method).
Returns:
true if the channel is enabled; false otherwise
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

isValid

public boolean isValid()
                throws RMException,
                       java.rmi.RemoteException
Tests whether the channel is valid. A channel is valid if, as far as can be determined, the channel could be used to send and receive data (subject to access control restrictions). Possible causes for invalid channels include not providing a transport profile or requesting support for multiple senders and providing a transport profile that cannot support this.
Returns:
true if the channel is valid; false otherwise
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

isAdvertising

public boolean isAdvertising()
                      throws RMException,
                             java.rmi.RemoteException
Tests if the channel is being advertised.
Returns:
true if the channel is being advertised; false otherwise
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getChannelID

public long getChannelID()
                  throws RMException,
                         java.rmi.RemoteException
Gets the channel ID (a long that identifies the channel uniquely, at least within the ChannelManager).
Returns:
the channel ID
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getAdvertisementCount

public long getAdvertisementCount()
                           throws RMException,
                                  java.rmi.RemoteException
Gets the count of times the channel has been advertised.
Returns:
the count of times the channel has been advertised
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getCurrentAdvertisementInterval

public int getCurrentAdvertisementInterval()
                                    throws RMException,
                                           java.rmi.RemoteException
Gets the number of seconds between the last two advertisements.
Returns:
the number of seconds between the last two advertisements
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getAdvertisementTimestamp

public java.util.Date getAdvertisementTimestamp()
                                         throws RMException,
                                                java.rmi.RemoteException
Gets the time the channel was last advertised.
Returns:
the time the channel was last advertised.
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

getCreationTime

public java.util.Date getCreationTime()
                               throws RMException,
                                      java.rmi.RemoteException
Gets the time the channel was created.
Returns:
the time the channel was created
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

isUsingCipher

public boolean isUsingCipher()
Test method to check if the cipher functionality is being used.
Returns:
true if the channel is being advertised; false otherwise

enableCipher

public void enableCipher()
Enables the use of cipher functionality.

disableCipher

public void disableCipher()
Disables the use of cipher functionality.

getCipherSpecFileName

public java.lang.String getCipherSpecFileName()
gets the name of the specification file that is to be used to initialize the Cipher.
Returns:
Name of the filename used to initialize Cipher module.

setCipherSpecFileName

public void setCipherSpecFileName(java.lang.String cipherSpecFileName)
sets the name of the specification file that is to be used to initialize the Cipher.
Parameters:
cipherSpecFileName - - the Name of the filename used to initialize Cipher module.

getTransportReceiverCount

public int getTransportReceiverCount()
                              throws RMException,
                                     java.rmi.RemoteException,
                                     UnsupportedException
Gets the number of receivers connected to the transport.
Returns:
the number of receivers connected to the transport
Throws:
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs


JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.