galaxy.server
Class DataOutBrokerProxy

java.lang.Object
  |
  +--galaxy.server.DataOutBrokerProxy

public class DataOutBrokerProxy
extends java.lang.Object

This class encapsulates a DataOutBroker.


Constructor Summary
DataOutBrokerProxy(int objectType, Server server, int pollMilliseconds, int timeoutSeconds)
          Creates an out broker proxy object.
DataOutBrokerProxy(java.lang.Object obj, Server server, int pollMilliseconds, int timeoutSeconds)
          Creates an out broker proxy object.
 
Method Summary
 void addArrayToArray(ArrayObject array)
          Adds an array to the array (i.e., instance of a class that implements the ArrayObject interface) that is being brokered by this proxy.
 void addObjectToList(java.lang.Object obj)
          Adds an object to the list (i.e., GVector) that is being brokered by this proxy.
 boolean close()
          Closes the out broker.
protected  void connectionEstablished()
          This method is called when this proxy's broker establishes a connection with a new inbound broker.
protected  void disconnectReceived()
          This method is called when this proxy's broker is told to disconnect from its client inbound brokers (once it times out).
 java.lang.String getCallId()
           
 java.lang.String getHost()
           
 java.lang.Object getObject()
           
 int getObjectType()
           
 DataOutBroker getOutBroker()
           
 int getPort()
           
 BrokerProxy getProxy()
           
 Server getServer()
           
 void write(java.lang.Object obj)
          Brokers an obj.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataOutBrokerProxy

public DataOutBrokerProxy(java.lang.Object obj,
                          Server server,
                          int pollMilliseconds,
                          int timeoutSeconds)
                   throws java.lang.IllegalArgumentException
Creates an out broker proxy object.
Parameters:
obj - the object that is to be brokered
server - the Server that created this proxy object
pollMilliseconds - the polling cycle in milliseconds of the underlying out broker. If less than or equal to zero, default poll is used.
timeoutSeconds - timeout in seconds for the broker. If zero, default timeout is used. If less than zero, broker never times out.
Throws:
java.lang.IllegalArgumentException - If an object that cannot be brokered is passed in.

DataOutBrokerProxy

public DataOutBrokerProxy(int objectType,
                          Server server,
                          int pollMilliseconds,
                          int timeoutSeconds)
                   throws java.lang.IllegalArgumentException
Creates an out broker proxy object.
Parameters:
objectType - the type of object that is to be brokered. If set to -1 any type of object can be brokered, including heterogeneous objects (e.g., both Int32 and Float64 objects).
server - the Server that created this proxy object
pollMilliseconds - the polling cycle in milliseconds of the underlying out broker. If less than or equal to zero, default poll is used.
timeoutSeconds - timeout in seconds for the broker. If zero, default timeout is used. If less than zero, broker never times out.
Throws:
java.lang.IllegalArgumentException - If an object type that cannot be brokered is passed in.
Method Detail

close

public boolean close()
Closes the out broker.
Returns:
true if the out broker was closed, false if there is no out broker

write

public void write(java.lang.Object obj)
Brokers an obj.
Parameters:
obj - the object to broker

addObjectToList

public void addObjectToList(java.lang.Object obj)
Adds an object to the list (i.e., GVector) that is being brokered by this proxy. If the object is not a valid GalaxyObject or if this proxy is not brokering a list, this method does nothing.
Parameters:
obj - the object to broker

addArrayToArray

public void addArrayToArray(ArrayObject array)
Adds an array to the array (i.e., instance of a class that implements the ArrayObject interface) that is being brokered by this proxy. If the specified array is not of the same type as the array that is being brokered by this proxy or if this proxy is not brokering an array, this method does nothing.
Parameters:
array - the array to broker

getObject

public java.lang.Object getObject()

getObjectType

public int getObjectType()

getOutBroker

public DataOutBroker getOutBroker()

getCallId

public java.lang.String getCallId()

getHost

public java.lang.String getHost()

getPort

public int getPort()

getServer

public Server getServer()

getProxy

public BrokerProxy getProxy()

connectionEstablished

protected void connectionEstablished()
This method is called when this proxy's broker establishes a connection with a new inbound broker.

disconnectReceived

protected void disconnectReceived()
This method is called when this proxy's broker is told to disconnect from its client inbound brokers (once it times out).