com.sun.multicast.reliable.simple
Class SimpleReceiver

java.lang.Object
  |
  +--com.sun.multicast.reliable.simple.SimpleReceiver

public class SimpleReceiver
extends java.lang.Object

A simple receiver object. This class provides a single class that lets you receive data as simply as possible. Multiple senders per channel, security, and out of order delivery are not supported.


Constructor Summary
SimpleReceiver(java.lang.String channelFileName)
          Creates a SimpleReceiver from a serialized channel store in a file.
SimpleReceiver(java.lang.String applicationName, java.lang.String channelName)
          Creates a SimpleReceiver with the parameters given.
 
Method Summary
 void close()
          Leaves the multicast transport session gracefully.
 java.io.InputStream getInputStream()
          Returns an InputStream object that may be used to receive data.
 TRAMTransportProfile getTRAMTransportProfile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleReceiver

public SimpleReceiver(java.lang.String applicationName,
                      java.lang.String channelName)
               throws ChannelNotFoundException,
                      RMException,
                      java.rmi.RemoteException
Creates a SimpleReceiver with the parameters given. This constructor finds the channel using the channel and application names provided.
Parameters:
applicationName - the name of the application
channelName - the name of the channel
Throws:
ChannelNotFoundException - if no channel is found.
RMException - if a reliable-multicast-related exception occurs
java.rmi.RemoteException - if an RMI-related exception occurs

SimpleReceiver

public SimpleReceiver(java.lang.String channelFileName)
               throws ChannelNotFoundException,
                      RMException
Creates a SimpleReceiver from a serialized channel store in a file.
Parameters:
channelFileName - the name of the file that stores the channel
Throws:
ChannelNotFoundException - if no channel is found.
RMException - if a reliable-multicast-related exception occurs
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws UnsupportedException,
                                          java.io.IOException,
                                          InvalidTransportProfileException,
                                          RMException
Returns an InputStream object that may be used to receive data.
Returns:
an InputStream object
Throws:
UnsupportedException - if the TransportProfile does not support stream sockets.
InvalidTransportProfileException - if the TransportProfile is invalid
java.io.IOException - if an I/O error occurs.
RMException - if a reliable-multicast-related exception occurs

close

public void close()
Leaves the multicast transport session gracefully. This method may take some time to return.

getTRAMTransportProfile

public TRAMTransportProfile getTRAMTransportProfile()


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