public class RandPortSrvrChan extends java.lang.Object implements SrvrChan
The backchannel is the core of the EventWeb system. It provides the connection between a EventWeb server and a EventWeb client.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
DEP_LIST
Class dependencies.
|
int |
mimeTypeId
Id for MIME type used by this channel.
|
java.lang.String |
name
Identifying name for channel.
|
java.io.BufferedReader |
reader
Reader for channel.
|
TvReader |
tvReader
Tag-Value reader for channel.
|
TvWriter |
tvWriter
Tag-Value writer for channel.
|
static java.lang.String |
VERSION
Class version.
|
java.io.PrintWriter |
writer
Writer for channel.
|
IF_VERSION| Constructor and Description |
|---|
RandPortSrvrChan(int commMode,
int connectTimeout,
int activityTimeout,
java.io.BufferedReader fcFromClient,
java.io.PrintWriter fcToClient)
Create a new RandPortSrvrChan.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Disconnect the client.
|
int |
connect(SesnKey bcCliSesKey,
SesnKey bcSrvSesKey,
int mimeTypeId)
Accept a client connection.
|
int |
getMimeTypeId()
Get the channel MIME type.
|
java.lang.String |
getName()
Get the channel identifier.
|
int |
getPort()
Get the local port assigned to the channel.
|
java.io.BufferedReader |
getReader()
Get the channel reader.
|
TvList |
getRec()
Read a record from the channel.
|
TvReader |
getTvReader()
Get the channel tag-value reader.
|
TvWriter |
getTvWriter()
Get the channel tag-value writer.
|
java.io.PrintWriter |
getWriter()
Get the channel writer.
|
void |
putRec(java.lang.String tag,
java.lang.String value)
Write a tag value pair as a single record.
|
void |
putRec(TvList data)
Write a tag-value list as a single record.
|
java.lang.String |
toString()
Get an identifying description of the channel.
|
public static final java.lang.String VERSION
public static final java.lang.String[] DEP_LIST
public java.io.BufferedReader reader
public java.io.PrintWriter writer
public TvReader tvReader
public TvWriter tvWriter
public java.lang.String name
public int mimeTypeId
MimeTypepublic RandPortSrvrChan(int commMode,
int connectTimeout,
int activityTimeout,
java.io.BufferedReader fcFromClient,
java.io.PrintWriter fcToClient)
throws java.io.IOException
commMode - Communications modeconnectTimeout - Time allowed for client to connect [ms]activityTimeout - Time to hold channel open with no activity [ms]fcFromClient - Frontchannel connection from clientfcToClient - Frontchannel connection to clientjava.io.IOException - If there is a failure at the TCP levelpublic int getPort()
public int connect(SesnKey bcCliSesKey, SesnKey bcSrvSesKey, int mimeTypeId) throws java.io.IOException
connect in interface SrvrChanbcCliSesKey - Client session keybcSrvSesKey - Server session keymimeTypeId - MIME type for communication on the channel.java.io.IOException - If the connection fails at the TCP levelMimeTypepublic java.lang.String getName()
public int getMimeTypeId()
getMimeTypeId in interface SrvrChanpublic TvList getRec() throws java.io.IOException
public void putRec(java.lang.String tag,
java.lang.String value)
public void putRec(TvList data)
public TvReader getTvReader()
getTvReader in interface SrvrChanpublic TvWriter getTvWriter()
getTvWriter in interface SrvrChanpublic java.io.BufferedReader getReader()
public java.io.PrintWriter getWriter()