|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.edg.info.SocketUtils
Class SocketUtils
Field Summary | |
static long |
CONNECT_TIMEOUT_MS
Maximum time to wait for socket connect (in ms). |
static int |
FINISH_CONNECT_RETRY_PERIOD_MS
Period to wait between attempts to finish connection (in ms). |
static long |
FINISH_WRITE_ID_RETRY_PERIOD_MS
Period to wait between attempts to "finish" writing consumer ID (in ms). |
static long |
WRITE_ID_TIMEOUT_MS
Maximum time to wait for ID write (in ms). |
Method Summary | |
static void |
closeSocketChannel(java.nio.channels.SocketChannel socketChannel)
Closes the given socket channel and shuts down its input and output. |
static java.nio.channels.SocketChannel |
createSocketChannel(org.edg.info.system.StreamRequest request)
Creates a new SocketChannel to the Streaming URL and Port in the request. |
static void |
writeEndResultToken(java.nio.channels.SocketChannel socketChannel)
Writes a ResultSet to a SocketChannel terminated by an END_ONETIME_RESULT_TOKEN. |
static void |
writeOneOffString(java.nio.channels.SocketChannel socketChannel,
java.lang.String responseFromUserCode)
|
static void |
writeResultSet(java.nio.channels.SocketChannel socketChannel,
org.glite.rgma.system.ResultSet result)
Writes a ResultSet to a SocketChannel |
static void |
writeString(java.nio.channels.SocketChannel socketChannel,
java.lang.String str)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long CONNECT_TIMEOUT_MS
public static final long WRITE_ID_TIMEOUT_MS
public static final int FINISH_CONNECT_RETRY_PERIOD_MS
public static final long FINISH_WRITE_ID_RETRY_PERIOD_MS
Method Detail |
public static void closeSocketChannel(java.nio.channels.SocketChannel socketChannel)
socketChannel
- Channel to close.public static java.nio.channels.SocketChannel createSocketChannel(org.edg.info.system.StreamRequest request) throws org.glite.rgma.system.RGMAInternalException, org.edg.info.system.ConnectionTimedOutException
request
- Provides details of streaming destination (URL & port)
null
if the socket couldn't be opened but should be retried.
RGMAException
- Thrown if the socketChannel could not be created
and there is no hope of it ever being created.
org.glite.rgma.system.RGMAInternalException
org.edg.info.system.ConnectionTimedOutException
public static void writeResultSet(java.nio.channels.SocketChannel socketChannel, org.glite.rgma.system.ResultSet result) throws java.io.IOException
socketChannel
- Remote socket to send to.result
- ResultSet to write.
java.io.IOException
- Thrown if socket channel write fails.public static void writeString(java.nio.channels.SocketChannel socketChannel, java.lang.String str) throws java.io.IOException
socketChannel
- str
-
java.io.IOException
public static void writeEndResultToken(java.nio.channels.SocketChannel socketChannel) throws java.io.IOException
socketChannel
- Remote socket to send to.
java.io.IOException
- Thrown if socket channel write fails.public static void writeOneOffString(java.nio.channels.SocketChannel socketChannel, java.lang.String responseFromUserCode) throws org.glite.rgma.system.RGMAInternalException
socketChannel
- responseFromUserCode
-
org.glite.rgma.system.RGMAInternalException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |