de::gsi::bel::xfer::XferImpl Class Reference

Inheritance diagram for de::gsi::bel::xfer::XferImpl:

de::gsi::bel::xfer::Xfer List of all members.

Public Member Functions

 XferImpl (String host, int port) throws IOException
 XferImpl (Socket s) throws IOException
Socket getSocket ()
void addObjectReceivedListener (XferListener listener)
void rmObjectReceivedListener (XferListener listener)
String getConnectionInfo ()
String toString ()
XferPrinter getXferPrinter ()
synchronized void sendObject (Object request) throws IOException
void finalize ()
void close () throws IOException

Protected Member Functions

void triggerObjectReceived (Object obj)
void triggerExit ()

Package Attributes

Connection con = null

Detailed Description

Main Object to use xml transfer between java and C/C++.

Author:
huhmann


Constructor & Destructor Documentation

de::gsi::bel::xfer::XferImpl::XferImpl ( String  host,
int  port 
) throws IOException [inline]

You give host and port of the service you want to exchange objects with.

Parameters:
host hostname the service is running on
port ip-portnumber the service is listening to
Exceptions:
IOException 

de::gsi::bel::xfer::XferImpl::XferImpl ( Socket  s  )  throws IOException [inline]

Use this constructor if you have already a connected socket to the service.

Parameters:
s connected socket to service
Exceptions:
IOException 


Member Function Documentation

void de::gsi::bel::xfer::XferImpl::addObjectReceivedListener ( XferListener  listener  )  [inline, virtual]

Add a listener to the Xfer object. The listener method handleMessage is called when an object is received, the exithandlder is called when the client closes the connection.

Parameters:
listener the listener to add
See also:
XferListener

Implements de::gsi::bel::xfer::Xfer.

void de::gsi::bel::xfer::XferImpl::close (  )  throws IOException [inline, virtual]

close the connection. The exitHandler is not called.

Exceptions:
IOException 

Implements de::gsi::bel::xfer::Xfer.

void de::gsi::bel::xfer::XferImpl::finalize (  )  [inline]

finalize method is called when object is deconstructed. It closes socket and stops receiver-thread

String de::gsi::bel::xfer::XferImpl::getConnectionInfo (  )  [inline, virtual]

Retrieve some information of the underlying connection

Returns:
String with Host and Port in the format <host>:<port>

Implements de::gsi::bel::xfer::Xfer.

Socket de::gsi::bel::xfer::XferImpl::getSocket (  )  [inline, virtual]

Get the socket of the xfer connection

Returns:
Socket of the xfer connection

Implements de::gsi::bel::xfer::Xfer.

XferPrinter de::gsi::bel::xfer::XferImpl::getXferPrinter (  )  [inline, virtual]

get the XferPrinter Object of Xfer

Returns:
XferPrinter
See also:
XferPrinter

Implements de::gsi::bel::xfer::Xfer.

void de::gsi::bel::xfer::XferImpl::rmObjectReceivedListener ( XferListener  listener  )  [inline, virtual]

Remove a listener

Parameters:
listener listener to remove

Implements de::gsi::bel::xfer::Xfer.

synchronized void de::gsi::bel::xfer::XferImpl::sendObject ( Object  request  )  throws IOException [inline, virtual]

send Object to a connected server.

Parameters:
request Object to send

Implements de::gsi::bel::xfer::Xfer.

String de::gsi::bel::xfer::XferImpl::toString (  )  [inline, virtual]

Returns:
String representation of the xfer object

Implements de::gsi::bel::xfer::Xfer.

void de::gsi::bel::xfer::XferImpl::triggerExit (  )  [inline, protected]

trigger exit listener of Xfer object.

void de::gsi::bel::xfer::XferImpl::triggerObjectReceived ( Object  obj  )  [inline, protected]

trigger message listener of Xfer object.

Parameters:
obj received object


The documentation for this class was generated from the following file:
Generated on 4 Mar 2014 for xferjava by  doxygen 1.4.7