JXTA

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

java.lang.Object
  extended by net.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.
 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

toString

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

Overrides:
toString in class Object
Returns:
last accessed time as a string

setTimeout

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

Specified by:
setTimeout in interface Outgoing
Parameters:
timeout - The new soTimeout value

close

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

Specified by:
close in interface Outgoing

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. The adaptor never times out.

Specified by:
getIdleTimeout in interface Outgoing
Returns:
Long.MAX_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

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 successful
Throws:
IOException - if an io error occurs

JXSE