copyright The Portico Project 2008.

org.portico.binding.jsop.rti
Class JSOPActiveConnection.JSOPServerConnection

java.lang.Object
  extended by org.portico.core.RTIConnection
      extended by org.portico.binding.jsop.rti.JSOPActiveConnection.JSOPServerConnection
Enclosing class:
JSOPActiveConnection

public class JSOPActiveConnection.JSOPServerConnection
extends RTIConnection

This class provides a link to the connection for the RTI. It is only created when a federate on the other end of the socket actually joins a federation. It it used by the RTI to send callback messages to the LRC on the other end.


Field Summary
 
Fields inherited from class org.portico.core.RTIConnection
rti
 
Constructor Summary
JSOPActiveConnection.JSOPServerConnection()
           
 
Method Summary
 void close(String reason)
          Closes the socket connection making sure to clean everything up once it is done.
 Socket getSocket()
          Fecth the socket that this connection is using.
 void sendCallback(com.lbf.commons.messaging.MessageContext message)
          Writes the request portion of the message down the socket connection.
 
Methods inherited from class org.portico.core.RTIConnection
getRtiExecution, harvestConnection, receiveRequest, setRequestHandler, setRtiExecution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSOPActiveConnection.JSOPServerConnection

public JSOPActiveConnection.JSOPServerConnection()
Method Detail

sendCallback

public void sendCallback(com.lbf.commons.messaging.MessageContext message)
                  throws Exception
Writes the request portion of the message down the socket connection. Following this, it fills out a SuccessMessage response in the context (regardless of what happens on the other side) unless there is an IOException thrown

Specified by:
sendCallback in class RTIConnection
Throws:
Exception

close

public void close(String reason)
Closes the socket connection making sure to clean everything up once it is done.

Specified by:
close in class RTIConnection
Parameters:
reason - Textual description of why the connection is being closed. Note that this may be null, so be sure to check before using it

getSocket

public Socket getSocket()
Fecth the socket that this connection is using.


copyright The Portico Project 2008.