JXTA

net.jxta.impl.util.pipe.reliable
Interface Outgoing

All Known Implementing Classes:
OutgoingMsgrAdaptor, OutgoingPipeAdaptor, OutgoingPipeAdaptorSync

public interface Outgoing

This interface specifies the methods that must be implemented by a connection in order to be able to reliably deliver messages over the connection.


Method Summary
 void close()
          Close the connection.
 long getIdleTimeout()
          Amount of time after which a connection is considered idle and may be scavenged.
 long getLastAccessed()
          Get the time when this connection was last used.
 long getMaxRetryAge()
          Amount if time during which retries may remain queued for retransmission.
 long getMinIdleReconnectTime()
          Amount of a connection must be idle before a reconnection attempt will be considered.
 boolean send(Message msg)
          Send a message to the remote peer.
 void setLastAccessed(long time)
          Set the time when this connection was last used.
 void setTimeout(int timeout)
          Sets the Timeout attribute.
 

Method Detail

send

boolean send(Message msg)
             throws IOException
Send a message to the remote peer.

Parameters:
msg - the message
Returns:
true is successful
Throws:
IOException - if io error occurs

close

void close()
Close the connection.


getMinIdleReconnectTime

long getMinIdleReconnectTime()
Amount of a connection must be idle before a reconnection attempt will be considered.

Returns:
min idle reconnect time in millis

setTimeout

void setTimeout(int timeout)
Sets the Timeout attribute. A timeout of 0 blocks forever

Parameters:
timeout - The new soTimeout value

getIdleTimeout

long getIdleTimeout()
Amount of time after which a connection is considered idle and may be scavenged.

Returns:
idle timeout in millis

getMaxRetryAge

long getMaxRetryAge()
Amount if time during which retries may remain queued for retransmission. If still unACKed after this amount of time then the connection is considered dead.

Returns:
max retry age in millis

getLastAccessed

long getLastAccessed()
Get the time when this connection was last used.

Returns:
last accessed in millis

setLastAccessed

void setLastAccessed(long time)
Set the time when this connection was last used.

Parameters:
time - in millis

JXSE