|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.channel.AbstractReliableFifoChannel
org.objectweb.tribe.channel.tcp.TcpChannel
This class defines a TcpChannel
Constructor Summary | |
TcpChannel()
Creates a new TcpChannel using the local host IP and a port
number choosen by the system. |
|
TcpChannel(IpAddress sourceAddress)
Creates a new TcpChannel binding the source endpoint to the
given address. |
|
TcpChannel(java.net.Socket socket)
Creates a new TcpChannel from an existing socket. |
Method Summary | |
void |
close()
Closes the channel. |
void |
connect(Address destination)
Connects to the given endpoint. |
Address |
getDestinationAddress()
Get the destination endpoint of this channel. |
protected java.io.DataInputStream |
getInStream()
Returns the inStream value. |
Address |
getSourceAddress()
Get the source endpoint of this channel. |
void |
send(ChannelMessage msg)
Sends a message on the channel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TcpChannel() throws java.io.IOException
TcpChannel
using the local host IP and a port
number choosen by the system.
java.io.IOException
- if an error occurspublic TcpChannel(IpAddress sourceAddress) throws java.io.IOException
TcpChannel
binding the source endpoint to the
given address.
sourceAddress
- address to bind the socket to
java.io.IOException
- if an error occurspublic TcpChannel(java.net.Socket socket) throws java.io.IOException
TcpChannel
from an existing socket.
socket
- a TCP socket
java.io.IOException
- if an error occursMethod Detail |
public void send(ChannelMessage msg) throws ChannelException, NotConnectedException
AbstractReliableFifoChannel
send
in class AbstractReliableFifoChannel
msg
- the message to send
NotConnectedException
- if the channel is not connected
ChannelException
- if an error occurs.AbstractReliableFifoChannel.send(org.objectweb.tribe.messages.ChannelMessage)
public void close() throws ChannelException
AbstractReliableFifoChannel
close
in class AbstractReliableFifoChannel
ChannelException
- if an error occurs.AbstractReliableFifoChannel.close()
public void connect(Address destination) throws ChannelException
AbstractReliableFifoChannel
connect
in class AbstractReliableFifoChannel
destination
- endpoint to connect to.
ChannelException
- if an error occurs.AbstractReliableFifoChannel.connect(org.objectweb.tribe.common.Address)
public Address getDestinationAddress()
AbstractReliableFifoChannel
getDestinationAddress
in class AbstractReliableFifoChannel
AbstractReliableFifoChannel.getDestinationAddress()
public Address getSourceAddress()
AbstractReliableFifoChannel
getSourceAddress
in class AbstractReliableFifoChannel
AbstractReliableFifoChannel.getSourceAddress()
protected java.io.DataInputStream getInStream()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |