public abstract class HostServerConnection extends java.lang.Object implements Connection
Modifier and Type | Class and Description |
---|---|
protected static class |
HostServerConnection.HostInputStream |
protected static class |
HostServerConnection.HostOutputStream |
Modifier and Type | Field and Description |
---|---|
protected HostServerConnection.HostInputStream |
in_ |
protected HostServerConnection.HostOutputStream |
out_ |
Modifier | Constructor and Description |
---|---|
protected |
HostServerConnection(SystemInfo info,
java.lang.String user,
java.lang.String jobName,
java.net.Socket socket,
HostServerConnection.HostInputStream in,
HostServerConnection.HostOutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Sends an "end job" datastream (if supported) and closes the underlying
socket.
|
protected static java.lang.String |
connect(SystemInfo info,
HostServerConnection.HostOutputStream dout,
HostServerConnection.HostInputStream din,
int serverID,
java.lang.String user,
java.lang.String password) |
protected void |
finalize() |
long |
getBytesReceived()
Returns the total number of bytes this connection has read since it was
opened.
|
long |
getBytesSent()
Returns the total number of bytes this connection has written since it was opened.
|
protected static byte[] |
getEncryptedPassword(byte[] userBytes,
byte[] passwordBytes,
byte[] clientSeed,
byte[] serverSeed,
int passwordLevel) |
SystemInfo |
getInfo()
Returns the system information associated with this connection.
|
java.lang.String |
getJobName()
Returns the host server job string for the job that is connected to this
connection.
|
java.lang.String |
getUser()
Returns the currently authenticated user of this connection.
|
boolean |
isClosed()
Returns true if close() has been called on this connection.
|
boolean |
isDatastreamDebug()
Returns true if datastream debugging is currently enabled.
|
static boolean |
isDefaultDatastreamDebug()
Returns true if debugging is enabled by default for all
HostServerConnection datastreams.
|
protected abstract void |
sendEndJobRequest() |
void |
setDatastreamDebug(boolean debug)
If debug is true, enables datastream debugging for this
connection.
|
static void |
setDefaultDatastreamDebug(boolean debug)
If debug is true, enables by default debugging on all
HostServerConnection datastreams created after the call to this method.
|
protected static void |
writePadEBCDIC(java.lang.String s,
int len,
HostServerConnection.HostOutputStream out) |
protected static void |
writePadEBCDIC10(java.lang.String s,
HostServerConnection.HostOutputStream out) |
protected static void |
writeStringToUnicodeBytes(java.lang.String s,
HostServerConnection.HostOutputStream out) |
protected final HostServerConnection.HostInputStream in_
protected final HostServerConnection.HostOutputStream out_
protected HostServerConnection(SystemInfo info, java.lang.String user, java.lang.String jobName, java.net.Socket socket, HostServerConnection.HostInputStream in, HostServerConnection.HostOutputStream out)
public static boolean isDefaultDatastreamDebug()
public static void setDefaultDatastreamDebug(boolean debug)
public long getBytesReceived()
public long getBytesSent()
public boolean isDatastreamDebug()
public void setDatastreamDebug(boolean debug)
public final void close() throws java.io.IOException
close
in interface Connection
java.io.IOException
protected abstract void sendEndJobRequest() throws java.io.IOException
java.io.IOException
protected final void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public final boolean isClosed()
isClosed
in interface Connection
public final SystemInfo getInfo()
public final java.lang.String getUser()
getUser
in interface Connection
public final java.lang.String getJobName()
getJobName
in interface Connection
protected static byte[] getEncryptedPassword(byte[] userBytes, byte[] passwordBytes, byte[] clientSeed, byte[] serverSeed, int passwordLevel) throws java.io.IOException
java.io.IOException
protected static java.lang.String connect(SystemInfo info, HostServerConnection.HostOutputStream dout, HostServerConnection.HostInputStream din, int serverID, java.lang.String user, java.lang.String password) throws java.io.IOException
java.io.IOException
protected static void writePadEBCDIC10(java.lang.String s, HostServerConnection.HostOutputStream out) throws java.io.IOException
java.io.IOException
protected static void writePadEBCDIC(java.lang.String s, int len, HostServerConnection.HostOutputStream out) throws java.io.IOException
java.io.IOException
protected static void writeStringToUnicodeBytes(java.lang.String s, HostServerConnection.HostOutputStream out) throws java.io.IOException
java.io.IOException