org.globus.rendezvous.service.test
Class TestClient

java.lang.Object
  extended byorg.globus.rendezvous.service.test.TestClient

public class TestClient
extends Object


Nested Class Summary
private  class TestClient.SubRendezvousCallback
           
private static interface TestClient.TestApplicationData
          Test data.
private  class TestClient.TopRendezvousCallback
           
 
Field Summary
private  byte[] applicationData
           
private  EndpointReferenceType eprSub1
           
private  EndpointReferenceType eprSub2
           
private  EndpointReferenceType eprTop
           
private  String hostName
           
private  byte[] inputData
           
private  RendezvousHelper invocationHelper
           
private  RendezvousFactoryServiceAddressingLocator locator
           
private static org.apache.commons.logging.Log logger
           
private  byte[] wholeData
           
 
Constructor Summary
TestClient(String hostName, byte[] applicationData)
           
 
Method Summary
private static void check(boolean assertion)
           
private static void check(boolean assertion, String messageIfFailure)
           
private  EndpointReferenceType createRendezvous(int capacity)
           
private  void createRendezvousResources()
           
private static void executeTestSuite(String hostName, byte[] applicationData)
           
private  RendezvousFactoryPortType getFactory()
           
private  String getServiceURL()
           
private  boolean isDataReceived()
           
private  boolean isTopRendezvousDone()
           
static void main(String[] args)
           
private static byte[] makeInputData(byte[] applicationData)
           
private  int readItemData(int offset, byte[] data, int depth, String[] itemNames)
           
private  void readWholeData2(byte[] wholeData)
           
private  int registerData(EndpointReferenceType endpoint, byte[] data)
           
private  int registerData(EndpointReferenceType endpoint, byte[] data, int desiredRank)
           
private  void setFactorySecurityProperties(Stub stub)
           
private  void setSecurityTypeFromEndpoint(EndpointReferenceType epr)
           
 void testRegisterToCompletion()
           
 void testRegistrationWhenCapacityIsZero()
           
 void testRegistrationWithDesiredRank()
           
 void testRegistrationWithTakenRank()
           
private  void waitAndSee()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locator

private RendezvousFactoryServiceAddressingLocator locator

hostName

private String hostName

applicationData

private byte[] applicationData

inputData

private byte[] inputData

eprTop

private EndpointReferenceType eprTop

wholeData

private byte[] wholeData

eprSub1

private EndpointReferenceType eprSub1

eprSub2

private EndpointReferenceType eprSub2

invocationHelper

private RendezvousHelper invocationHelper

logger

private static final org.apache.commons.logging.Log logger
Constructor Detail

TestClient

public TestClient(String hostName,
                  byte[] applicationData)
Parameters:
applicationData - byte[] the application-meaningful data to register with the bottom level rendezvous resource. It will be the same for all bottom-level registrant, which is not very realistic... (this is NOT the input data to the register() call!)
Method Detail

makeInputData

private static byte[] makeInputData(byte[] applicationData)

getServiceURL

private String getServiceURL()

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

executeTestSuite

private static void executeTestSuite(String hostName,
                                     byte[] applicationData)
                              throws Exception
Throws:
Exception

createRendezvous

private EndpointReferenceType createRendezvous(int capacity)
                                                                           throws Exception
Throws:
Exception

getFactory

private RendezvousFactoryPortType getFactory()
                                      throws Exception
Throws:
Exception

testRegistrationWhenCapacityIsZero

public void testRegistrationWhenCapacityIsZero()
                                        throws Exception
Throws:
Exception

testRegistrationWithDesiredRank

public void testRegistrationWithDesiredRank()
                                     throws Exception
Throws:
Exception

testRegistrationWithTakenRank

public void testRegistrationWithTakenRank()
                                   throws Exception
Throws:
Exception

testRegisterToCompletion

public void testRegisterToCompletion()
                              throws Exception
Throws:
Exception

check

private static void check(boolean assertion)

check

private static void check(boolean assertion,
                          String messageIfFailure)

createRendezvousResources

private void createRendezvousResources()
                                throws Exception
Throws:
Exception

registerData

private int registerData(EndpointReferenceType endpoint,
                         byte[] data)
                  throws Exception
Throws:
Exception

registerData

private int registerData(EndpointReferenceType endpoint,
                         byte[] data,
                         int desiredRank)
                  throws Exception
Throws:
Exception

waitAndSee

private void waitAndSee()
                 throws Exception
Throws:
Exception

isDataReceived

private boolean isDataReceived()

isTopRendezvousDone

private boolean isTopRendezvousDone()
                             throws Exception
Throws:
Exception

readWholeData2

private void readWholeData2(byte[] wholeData)

readItemData

private int readItemData(int offset,
                         byte[] data,
                         int depth,
                         String[] itemNames)

setFactorySecurityProperties

private void setFactorySecurityProperties(Stub stub)

setSecurityTypeFromEndpoint

private void setSecurityTypeFromEndpoint(EndpointReferenceType epr)