| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private Hashtable | |
| private static String | |
| private static String | |
| protected static final String | |
| private static String | |
| private String | |
| private static String | |
| private ByteArrayOutputStream | |
| protected static final int | |
| protected static final int | |
| private boolean | |
| private InputStream | |
| private String | |
| private OutputStream | |
| private Socket | |
| private static final String | |
| private static Driver | |
| private PrintWriter | |
| private static final int[] | |
| private static final String | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| private Vector | |
| private DataOutputStream | |
| private static final String[] | |
| private int | |
| private Session | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| private static final int | |
| public static final int | |
| public static final int | |
| private static final String[] | |
| private String | |
| private boolean | |
| protected static final int | |
| pack-priv static final Charset | |
| protected static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final String | |
| private static final String | |
| private static final String | |
| private String | |
| private String | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private int | |
| private InetAddress | |
| private String | |
| protected static final int | |
| private boolean | |
| private LocalizedResource | |
| pack-priv ArrayList | localAddresses
List of local addresses for checking admin commands. |
| private boolean | |
| private Object | |
| private PrintWriter | |
| private static final int | |
| private int | |
| private static final int | MAXREPLY
Maximum reply size. |
| private int | |
| private memCheck | |
| private static final int[] | |
| private static final int | |
| private static final int | |
| private int | |
| private int | |
| private static final AtomicInteger | nextThreadNumber
Holds the sequence number to be assigned to the next thread that
calls |
| private static final int | |
| private static final int | |
| private String | |
| private Object | |
| private int | |
| private static String | |
| private static byte[] | |
| private String | |
| private static final String | |
| private static final int | |
| private byte[] | |
| private int | |
| private int | |
| private boolean | |
| private Vector | |
| private NetworkServerControlImpl | |
| private ServerSocket | |
| private Object | |
| private int | |
| private Hashtable | |
| private boolean | |
| private static final int | |
| private static final int | |
| private static final int | |
| private boolean | |
| private Object | |
| protected static final byte | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private int | |
| private static boolean | SUPPORTS_EUSRIDPWD
Can EUSRIDPWD security mechanism be used with the current JVM |
| private NetworkServerControlImpl | |
| private Vector | |
| private Object | |
| private int | |
| private Object | |
| private boolean | |
| private Object | |
| private String | |
| private Object | |
| public static final String | |
| private boolean | |
| private static final int | |
| private String | |
| private static String | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | NetworkServerControlImpl(InetAddress
InetAddress to listen on, throws NPE if null address, int portNumber to listen on, -1 use property or default portNumber)Internal constructor for NetworkServerControl API. |
| public | NetworkServerControlImpl(String
the user name for actions requiring authorization userName, String the password for actions requiring authorization password)Internal constructor for NetworkServerControl API. |
| public | NetworkServerControlImpl(InetAddress
InetAddress to listen on, throws NPE if null address, int portNumber to listen on, -1 use property or default portNumber, String the user name for actions requiring authorization userName, String the password for actions requiring authorization password)Internal constructor for NetworkServerControl API. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | addSession(Socket
the socket to read from and write to clientSocket)Add a session - for use by |
| public static String | |
| public static String | |
| public static String | |
| public void | blockingStart(PrintWriter
PrintWriter to which server console will be
output. Null will disable console output. consoleWriter)Start a network server |
| private void | buildLocalAddressList(InetAddress
Address on which server was started
Note: Some systems may not support localhost.
In that case a console message will print for the localhost entries,
but the server will continue to start. bindAddr)Build local address list to allow admin commands. |
| public String | |
| private void | |
| public void | |
| private void | |
| private void | |
| public void | consoleError(String
error message msg)Write an error message to console output stream and throw an exception for this error |
| public void | consoleExceptionPrint(Exception
exception e)Write an exception to console output stream, but only if debugOutput is true. |
| public void | consoleExceptionPrintTrace(Throwable
exception e)Write an exception (with trace) to console output stream. |
| public void | consoleMessage(String
message msg, boolean Whether to prepend a timestamp to the message or not printTimeStamp)Write a message to console output stream |
| private void | |
| protected void | consolePropertyMessage(String
message property key msgProp, boolean whether to prepend a timestamp to the message printTimeStamp)Put property message on console |
| protected void | consolePropertyMessage(String
message property key msgProp, String argument for message arg)Put property message on console |
| protected void | consolePropertyMessage(String
message property key msgProp, String[] argument array for message args)Put property message on console |
| private void | consolePropertyMessageWork(String
message key messageKey, String[] arguments to message args, boolean whether to prepend a timestamp to the message printTimeStamp)Handle console error message - display on console and if it is a user error, display usage - if user error or severe error, throw exception with message key and message |
| private void | consoleTraceMessage(int connNum, boolean
true to print tracing on, false to print tracing off on)Print trace change message to console |
| private ServerSocket | |
| public boolean | |
| public void | |
| pack-priv void | |
| private void | ensureDataInBuffer(int
size of buffer required minimumBytesNeeded, boolean tells whether or not an error should be raised if
end-of-stream is reached before the requested amount of bytes could
be read failOnEOS)Ensure the reply buffer is large enough to hold all the data; don't just rely on OS level defaults |
| public void | executeWork(int
The command to execute. The command itself was determined by an earlier call to parseArgs(). command)Execute the command given on the command line |
| private void | |
| private int | Returns: commandarguments to search args)Go through the arguments and find the command and save the dash arguments and arguments to the command. |
| private static Object | findService(final String factoryInterface, final String serviceName)
Must be private so that user code can't call this entry point. |
| pack-priv int | |
| protected AppRequester | Returns: stored application requesterApplication Requester to look for appRequester)Get the stored application requester or store if we haven't seen it yet |
| pack-priv long | |
| pack-priv long | |
| private String | |
| pack-priv int | |
| public Properties | |
| protected static Driver | |
| private String | |
| public String | |
| private int | Returns: integer valueproperty name propName, String string property value propVal)Get integer property values |
| protected boolean | Returns: the current value of keepAliveGet the current value of keepAlive to configure how long the server should keep the socket alive for a disconnected client |
| public boolean | Returns: true if logging connections is on; false otherwiseGet the current value of logging connections |
| protected int | Returns: manager levelcodepoint for manager manager)Get the server manager level for a given manager |
| private int | Returns: value of maximum number of threadsGet the current value of maximum number of threads to create |
| private int | |
| private int | Returns: value of minimum number of threadsGet the current value of minimum number of threads to create at start |
| private ProductVersionHolder | getNetProductVersionHolder()
Retrieve product version information We need to make sure that this method gets the stream and passes it to ProductVersionHolder, because it lives in the Network Server jar and won't be readily available to ProductVersionHolder when running under security manager. |
| private String | |
| protected Session | Returns: next session to work on, could be same as current sessionsession thread is currently working on currentSession)Get the next session for the thread to work on Called from DRDAConnThread after session completes or timeslice exceeded. |
| public int | |
| private void | |
| pack-priv Properties | Returns: a collection of network server properties and their current valuesConstructs an object containing network server related properties and their values. |
| pack-priv int | |
| private String | |
| private int | Returns: integer value , return the SECMEC value for the security mechanism as defined by DRDA spec or INVALID_OR_NOTSET_SECURITYMECHANISM if 's' passed is invalid or not supported security mechanismsecurity mechanism name s)Retrieve the SECMEC integer value from the user friendly security mechanism name |
| protected int | Returns: the securitymechanism value. It is value that the derby.drda.securityMechanism was set to, if it is not set, then it is equal to INVALID_OR_NOTSET_SECURITYMECHANISMget the security mechanism (secmec value) that the server will accept connections from. |
| protected boolean | |
| protected Object | |
| protected int | |
| private String | Returns: The string representation ("off","on" or "autneticate"). Will default to SSL_OFF for other values than those listed above.The SSL-mode value (SSL_OFF, SSL_BASIC or
SSL_PEER_AUTHENTICATION) i)Get the string value of the SSL-mode. |
| private int | Returns: SSL_OFF, SSL_BASIC or SSL_PEER_AUTHENTICATION. Will default to SSL_OFF if the input does not match one of the four listed above.the SSL-mode string ("off"/"false", "on"/"true" or
"authenticate"/"auth" s)Get the SSL-mode from a string. |
| private Properties | |
| private String | Returns: String - return the string name corresponding to the secmec value if recognized else returns nullsecmec value secmecVal)Retrieve the string name for the integer secmec value |
| private static Object | getSystemModule(final String factoryInterface)
Must be private so that user code can't call this entry point. |
| pack-priv int | |
| protected int | |
| protected boolean | Returns: true if tracing is on for all sessions; false otherwiseGet the current value of whether to trace all the sessions |
| protected String | |
| pack-priv static String | Returns: a unique thread name that starts withbase and is
followed by an underscore and a unique sequence numberthe first part of the thread name (the meaningful part) base)Get a thread name that is both meaningful and unique (primarily for debugging purposes). |
| private void | |
| protected static boolean | |
| private boolean | Returns: true if it is a property key; false otherwisemessage msg)Determine whether string is a property key or not property keys start with DRDA_MSG_PREFIX |
| private boolean | |
| public boolean | |
| public String | Returns: the localized messagemessage key msgProp, String[] arguments to message args)Convenience routine so that NetworkServerControl can localize messages. |
| private String | localizeMessage(String
message key msgProp, LocalizedResource LocalizedResource to use to localize message localLangUtil, String[] arguments to message args)Localize a message given a particular AppUI |
| public void | |
| private void | |
| public PrintWriter | |
| private PrintWriter | |
| public void | netSetMaxThreads(int
maximum number of connections, if 0, connections
created when no free connection available
if -1, use default max)Connect to network server and set connection maxthread parameter |
| public void | netSetTimeSlice(int
amount of time given to each session before yielding to
another session, if 0, never yield. if -1, use default. timeslice)Set network server connection timeslice parameter |
| public int | |
| public void | |
| private void | |
| public static String | |
| public static byte[] | |
| protected synchronized void | processCommands(DDMReader
input reader for command reader, DDMWriter output writer for command writer, Session session information session)processCommands reads and processes NetworkServerControlImpl commands sent to the network server over the socket. |
| private int | Returns: commandstarting point pos, String[] arguments to search args)Get the dash argument. |
| private byte[] | |
| private void | |
| private int | |
| private byte[] | |
| private String | |
| private void | |
| private int | |
| private String | |
| protected void | |
| private String[] | |
| pack-priv void | |
| public boolean | Returns: true if the customer forcibly overrode our decisionReturn true if the customer forcibly overrode our decision to install a default SecurityManager. |
| private void | |
| public String | |
| private void | |
| private void | sendMessage(DDMWriter
writer to use for sending message writer, int 1 for Warning, 2 for Error 3 for SQLError messageType, String message message)Send Error or Warning from server to client after processing a command |
| private void | |
| private void | |
| private void | sendPropInfo(DDMWriter
writer to use for sending sysinfo writer)Send property information from server to client |
| private void | sendRuntimeInfo(DDMWriter
writer to use for sending sysinfo writer)Send RuntimeInfo information from server to client |
| public void | |
| private void | sendSQLMessage(DDMWriter
writer to use for sending message writer, SQLException Derby exception se, int type of exception, SQLERROR or SQLWARNING type)Send SQL Exception from server to client after processing a command |
| private void | sendSysInfo(DDMWriter
writer to use for sending sysinfo writer)Send SysInfo information from server to client |
| public void | |
| private void | setLogConnections(boolean
true to turn logging connections on; false to turn it off value)Set the current value of logging connections |
| public void | setLogWriter(PrintWriter
output stream for console messages outWriter)Set the output stream for console messages If this is set to null, no messages will be written to the console |
| private void | setMaxThreads(int
value of maximum number of threads value)Set the current value of maximum number of threads to create |
| private void | setMinThreads(int
value of minimum number of threads value)Set the current value of minimum number of threads to create at start |
| private void | setSecurityMechanism(String
security mechanism string value s)Set the security mechanism for derby.drda.securityMechanism If this property is set, server will only allow connections from client with this security mechanism. |
| protected void | |
| private void | |
| private boolean | Returns: true if set false if an error occurredtrue to turn trace on; false to turn it off on)Set the trace on/off for all sessions, or one session, depending on whether we got -s argument. |
| private void | setTraceAll(boolean
true if tracing is on for all sessions; false otherwise value)Set the current value of whether to trace all the sessions |
| private void | |
| private void | |
| public void | |
| public void | start(PrintWriter
PrintWriter to which server console will be
output. Null will disable console output. consoleWriter)Start a network server. |
| protected void | |
| protected boolean | Returns: true if supported; false otherwiseCCSID to check ccsid)Check whether a CCSID code page is supported |
| pack-priv boolean | Returns: true if EUSRIDPWD is supported, false otherwiseThis method returns whether EUSRIDPWD security mechanism is supported or not. |
| public String | |
| private void | throwSQLException(String
msg containing SQL Exception msg)Throw a SQL Exception which was sent over by a server Format of the msg is SQLSTATE:localized message\nSQLSTATE:next localized message |
| private void | throwSQLWarning(String
msg containing SQL Warning msg)Throw a SQL Warning which was sent over by a server Format of the msg is SQLSTATE:localized message\nSQLSTATE:next localized message |
| private void | throwUnexpectedException(Exception
An unexpected exception. e)Print a trace for the (unexpected) exception received, then throw a generic exception indicating that 1) an unexpected exception was thrown, and 2) we've already printed the trace (so don't do it again). |
| public void | trace(boolean
true to turn tracing on, false to turn tracing off on)Turn tracing on or off for all sessions |
| public void | trace(int
the connNum of the session, 0 if all sessions connNum, boolean true to turn tracing on, false to turn tracing off on)Turn tracing on or off for one session or all sessions |
| private void | |
| public void | |
| private void | wrapSQLError(String
Derby SQL Exception message id messageKey)Wrap SQL Error - display to console and raise exception |
| private void | wrapSQLWarning(String
Derby SQL Exception message id messageKey)Wrap SQL Warning - display to console and raise exception |
| private void | |
| private void | writeCommandHeader(int
command to be written command)Write command header consisting of command header string and default protocol version and command. |
| private void | writeCommandHeader(int
command to be written command, int protocol version to be used
for the given command protocol_version_for_command)Write command header consisting of command header string and passed protocol version and command. |
| private void | |
| private void | |
| private void | |
| protected void |