uk.ac.rdg.resc.jstyx.interloper
Class StyxInterloper

java.lang.Object
  extended by uk.ac.rdg.resc.jstyx.interloper.StyxInterloper
All Implemented Interfaces:
InterloperListener
Direct Known Subclasses:
StyxMon

public class StyxInterloper
extends java.lang.Object
implements InterloperListener

A StyxInterloper listens for Styx messages, then forwards them directly to another Styx server. The replies from the other Styx server are sent back to the client. This allows the Styx messages sent between systems to be investigated.

Author:
Jon Blower $Revision: 507 $ $Date: 2005-12-01 08:21:56 +0000 (Thu, 01 Dec 2005) $ $Log$ Revision 1.8 2005/12/01 08:21:56 jonblower Fixed javadoc comments Revision 1.7 2005/05/05 16:57:37 jonblower Updated MINA library to revision 168337 and changed code accordingly Revision 1.6 2005/03/11 14:01:59 jonblower Merged MINA-Test_20059309 into main line of development Revision 1.5.2.2 2005/03/10 20:55:37 jonblower Removed references to Netty Revision 1.5.2.1 2005/03/10 14:31:48 jonblower Modified for MINA framework Revision 1.5 2005/02/28 12:08:18 jonblower Tidied up interaction between StyxInterloper and StyxMon Revision 1.1.1.1 2005/02/16 18:58:26 jonblower Initial import

Field Summary
protected  java.net.InetSocketAddress destSockAddr
           
protected  int port
           
protected  StyxServer styxServer
           
 
Constructor Summary
StyxInterloper(int port, java.lang.String serverHost, int serverPort)
          Creates a new StyxInterloper.
 
Method Summary
protected static void checkArgs(java.lang.String[] args)
          Checks the command-line arguments, throwing an Exception if there is a problem
static void main(java.lang.String[] args)
           
 void rMessageSent(StyxMessage message)
          Called when an Rmessage has been sent back to the client.
 void tMessageReceived(StyxMessage message)
          Called when a Tmessage arrives from a client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

port

protected int port

destSockAddr

protected java.net.InetSocketAddress destSockAddr

styxServer

protected StyxServer styxServer
Constructor Detail

StyxInterloper

public StyxInterloper(int port,
                      java.lang.String serverHost,
                      int serverPort)
               throws java.io.IOException
Creates a new StyxInterloper.

Parameters:
port - The port on which this server will listen
serverHost - The host of the destination to which this server will connect
serverPort - The port of the destination to which this server will connect
Throws:
java.io.IOException - if there was an error starting the Styx server
Method Detail

tMessageReceived

public void tMessageReceived(StyxMessage message)
Called when a Tmessage arrives from a client. Does nothing here (the message will already have been logged)

Specified by:
tMessageReceived in interface InterloperListener

rMessageSent

public void rMessageSent(StyxMessage message)
Called when an Rmessage has been sent back to the client. Does nothing here (the message will already have been logged)

Specified by:
rMessageSent in interface InterloperListener

main

public static void main(java.lang.String[] args)

checkArgs

protected static void checkArgs(java.lang.String[] args)
                         throws java.lang.Exception
Checks the command-line arguments, throwing an Exception if there is a problem

Throws:
java.lang.Exception


Copyright © 2004-2006 Reading e-Science Centre. All Rights Reserved.