VistALink v1.5.0.026

gov.va.med.net
Class SocketManager

java.lang.Object
  extended bygov.va.med.net.SocketManager
All Implemented Interfaces:
java.io.Serializable

public class SocketManager
extends java.lang.Object
implements java.io.Serializable

Represents a socket that can be used to communicate with IP end points

Version:
1.5.0.026
Author:
Application Modernization - Foundations Team
See Also:
Serialized Form

Constructor Summary
SocketManager()
          Default constructor
SocketManager(java.net.Socket soc)
          Constructs this SocketManager with the specified socket.
 
Method Summary
 int getBufferSize()
          Returns the buffer size.
 java.lang.String getMatchingIdentifier()
          Gets the socket's identifier (if any).
 java.net.Socket getSoc()
          Gets the socket associated with this SocketManager.
 java.lang.String receiveData()
          Reads the socket for a response and writes to String.
 void sendData(java.lang.String xmlRequest)
          Writes the xmlRequest param to the open socket.
 void setBufferSize(int value)
          Sets the buffer size.
 void setMatchingIdentifier(java.lang.String string)
          Sets an identifier to identify the socket
 void setSoc(java.net.Socket value)
          Sets the socket associated with this SocketManager.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SocketManager

public SocketManager()
Default constructor


SocketManager

public SocketManager(java.net.Socket soc)
Constructs this SocketManager with the specified socket.

Parameters:
soc -
Method Detail

getBufferSize

public int getBufferSize()
Returns the buffer size.

Returns:
int

setBufferSize

public void setBufferSize(int value)
Sets the buffer size.

Parameters:
value -

getSoc

public java.net.Socket getSoc()
Gets the socket associated with this SocketManager.

Returns:
Socket

setSoc

public void setSoc(java.net.Socket value)
Sets the socket associated with this SocketManager.

Parameters:
value -

sendData

public void sendData(java.lang.String xmlRequest)
              throws VistaSocketException
Writes the xmlRequest param to the open socket.

Parameters:
xmlRequest -
Throws:
VistaSocketException

receiveData

public java.lang.String receiveData()
                             throws VistaSocketException,
                                    VistaSocketTimeOutException
Reads the socket for a response and writes to String.

Returns:
String
Throws:
VistaSocketException
VistaSocketTimeOutException

getMatchingIdentifier

public java.lang.String getMatchingIdentifier()
Gets the socket's identifier (if any).

Returns:
Matching identifier

setMatchingIdentifier

public void setMatchingIdentifier(java.lang.String string)
Sets an identifier to identify the socket

Parameters:
string - matching identifier

toString

public java.lang.String toString()
Returns:
String representation of this object.

VistALink v1.5.0.026

VistALink v1.5.0.026