Project JXTA

net.jxta.impl.util.pipe.reliable
Class OutgoingMsgrAdaptor

java.lang.Object
  extended bynet.jxta.impl.util.pipe.reliable.OutgoingMsgrAdaptor
All Implemented Interfaces:
Outgoing

public class OutgoingMsgrAdaptor
extends Object
implements Outgoing

OutgoingMessengerAdaptor


Constructor Summary
OutgoingMsgrAdaptor(Messenger msgr, int timeout)
          Constructor for the OutgoingMsgrAdaptor object
 
Method Summary
 void close()
          close the messenger (does not close the messenger)
 long getIdleTimeout()
          Gets the idleTimeout of the OutgoingMsgrAdaptor NEVER.
 long getLastAccessed()
          Gets the lastAccessed time of OutgoingMsgrAdaptor
 long getMaxRetryAge()
          Gets the maxRetryAge attribute of the OutgoingMsgrAdaptor
 long getMinIdleReconnectTime()
          Gets the minIdleReconnectTime of the OutgoingMsgrAdaptor (obsolete).
 boolean send(Message msg)
          Sends a message
 void setLastAccessed(long time)
          Sets the lastAccessed of OutgoingMsgrAdaptor
 void setTimeout(int timeout)
          Sets the Timeout attribute.
 String toString()
          returns last accessed time as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OutgoingMsgrAdaptor

public OutgoingMsgrAdaptor(Messenger msgr,
                           int timeout)
Constructor for the OutgoingMsgrAdaptor object

Parameters:
msgr - the messenger used to send messages
timeout - timeout in milliseconds
Method Detail

setTimeout

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

Parameters:
timeout - The new soTimeout value

close

public void close()
           throws IOException
close the messenger (does not close the messenger)

Specified by:
close in interface Outgoing
Throws:
IOException - Description of the Exception

getMinIdleReconnectTime

public long getMinIdleReconnectTime()
Gets the minIdleReconnectTime of the OutgoingMsgrAdaptor (obsolete).

Specified by:
getMinIdleReconnectTime in interface Outgoing
Returns:
The minIdleReconnectTime value

getIdleTimeout

public long getIdleTimeout()
Gets the idleTimeout of the OutgoingMsgrAdaptor NEVER.

Specified by:
getIdleTimeout in interface Outgoing
Returns:
The idleTimeout value

getMaxRetryAge

public long getMaxRetryAge()
Gets the maxRetryAge attribute of the OutgoingMsgrAdaptor

Specified by:
getMaxRetryAge in interface Outgoing
Returns:
The maxRetryAge value

getLastAccessed

public long getLastAccessed()
Gets the lastAccessed time of OutgoingMsgrAdaptor

Specified by:
getLastAccessed in interface Outgoing
Returns:
The lastAccessed in milliseconds

setLastAccessed

public void setLastAccessed(long time)
Sets the lastAccessed of OutgoingMsgrAdaptor

Specified by:
setLastAccessed in interface Outgoing
Parameters:
time - The new lastAccessed in milliseconds

toString

public String toString()
returns last accessed time as a string

Specified by:
toString in interface Outgoing
Returns:
last accessed time as a string

send

public boolean send(Message msg)
             throws IOException
Sends a message

Specified by:
send in interface Outgoing
Parameters:
msg - message to send
Returns:
true if message send is successfull
Throws:
IOException - if an io error occurs

JXTA J2SE