|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--galaxy.server.DataInBroker
This class represents the consumer of a brokering connection. Subclasses of this class try to establish a connection to specified outgoing broker (i.e., the data supplier), receive the brokered data, and process the data.
Field Summary | |
protected Environment |
env
The call environment of the server dispatch function that created this broker. |
protected FrameDispatcher |
frameDispatcher
Frame dispatcher of the Server that started this broker |
protected Server |
server
The Server that created this broker. |
Constructor Summary | |
DataInBroker(Server server,
java.net.InetAddress ip,
int port,
GFrame frame)
Constructor. |
|
DataInBroker(Server server,
java.lang.String hostName,
int port,
GFrame frame)
Constructor. |
Method Summary | |
protected void |
abortReceived()
This method is called when this broker catches and unexpected exception while receiving brokered data. |
protected void |
cleanup()
This cleanup method is called when this broker is preparing to stop. |
protected void |
disconnectReceived()
This method is called when this broker receives a disconnect message from the outgoing broker (indicates all data has been received). |
Server |
getServer()
Returns the reference to the Server that created this
broker. |
boolean |
isStopped()
Indicates if this broker is stopped. |
abstract void |
receivedBinary(GBinary bin)
Executed when a GBinary is read by this incoming broker. |
abstract void |
receivedFloat(java.lang.Float floatObject)
Executed when a Float is read by this incoming broker. |
abstract void |
receivedFloat32(Float32 float32)
Executed when a Float32 is read by this incoming broker. |
abstract void |
receivedFloat64(Float64 float64)
Executed when a Float64 is read by this incoming broker. |
abstract void |
receivedFrame(GFrame frame)
Executed when a GFrame is read by this incoming broker. |
abstract void |
receivedInt16(Int16 int16)
Executed when an Int16 is read by this incoming broker. |
abstract void |
receivedInt32(Int32 int32)
Executed when an Int32 is read by this incoming broker. |
abstract void |
receivedInt64(Int64 int64)
Executed when an Int64 is read by this incoming broker. |
abstract void |
receivedInteger(java.lang.Integer integerObject)
Executed when an Integer is read by this incoming broker. |
abstract void |
receivedList(GVector list)
Executed when a GVector is read by this incoming broker. |
abstract void |
receivedString(java.lang.String str)
Executed when a String is read by this incoming broker. |
abstract void |
receivedSymbol(Symbol symbol)
Executed when a Symbol is read by this incoming broker. |
void |
registerWithServer()
Registers this broker with the Server that started it. |
void |
run()
The thread routine for this broker. |
void |
start()
Performs the broker client side of the handshake and starts the broker thread, assuming the handshake succeeded. |
void |
stop()
Marks this broker's thread as being stopped. |
void |
unregisterFromServer()
Unregisters this broker from the Server that started it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Server server
Server
that created this broker.protected Environment env
protected FrameDispatcher frameDispatcher
Server
that started this brokerConstructor Detail |
public DataInBroker(Server server, java.net.InetAddress ip, int port, GFrame frame) throws java.lang.Exception
server
- the Server
that created this brokerip
- the IP address of the server that manages access to the
outgoing broker to which this broker wishes to connectport
- the "listener" port of the target serverframe
- a GFrame
that contains the call id of the
outgoing broker to which this broker wishes to connectpublic DataInBroker(Server server, java.lang.String hostName, int port, GFrame frame) throws java.lang.Exception
server
- the Server
that created this brokerhostName
- the host name of the server that manages access to the
outgoing broker to which this broker wishes to connectport
- the "listener" port of the target serverframe
- a GFrame
that contains the call id of the
outgoing broker to which this broker wishes to connectMethod Detail |
public Server getServer()
Server
that created this
broker.public boolean isStopped()
public void start()
public void run()
received
methods defined by
subclasses of this class.run
in interface java.lang.Runnable
public void stop()
protected void cleanup()
DataInBroker
cleanup will still take place.protected void disconnectReceived()
protected void abortReceived()
public void registerWithServer()
Server
that started it.
At the moment, this will cause this broker to be stopped if the server
loses its connection to the Hub.public void unregisterFromServer()
Server
that started it.public abstract void receivedString(java.lang.String str)
str
- the string receivedpublic abstract void receivedBinary(GBinary bin)
bin
- the binary object receivedpublic abstract void receivedFrame(GFrame frame)
frame
- the frame receivedpublic abstract void receivedList(GVector list)
list
- the list receivedpublic abstract void receivedInt16(Int16 int16)
int16
- the 16-bit integer array receivedpublic abstract void receivedInt32(Int32 int32)
int32
- the 32-bit integer array receivedpublic abstract void receivedInt64(Int64 int64)
int64
- the 64-bit integer array receivedpublic abstract void receivedFloat32(Float32 float32)
float32
- the 32-bit floating point number array receivedpublic abstract void receivedFloat64(Float64 float64)
float64
- the 64-bit floating point number array receivedpublic abstract void receivedInteger(java.lang.Integer integerObject)
integerObject
- the integer receivedpublic abstract void receivedFloat(java.lang.Float floatObject)
floatObject
- the float receivedpublic abstract void receivedSymbol(Symbol symbol)
symbol
- the symbol received
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |