public class Server
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
private int |
agentCount |
MsgInterface |
messaging |
private static javax.net.ServerSocketFactory |
socketFactory |
private static java.net.ServerSocket |
surrogateSocket |
Constructor and Description |
---|
Server()
this is the network interface.
|
Server(java.lang.String hostIPA,
int commsPort,
int backlog,
int currentCount)
this is the server thread constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
disconnect()
this attempts to release the server thread socket connectedSocket.
|
void |
disconnect(java.net.ServerSocket socket)
this attempts to release the server socket connectedSocket.
|
void |
disconnect(java.net.Socket socket)
this attempts to release the socket connectedSocket.
|
java.net.InetAddress |
getIPA(byte[] address)
this returns an InetAddress based on a 32-bit byte array while checking
for exceptions.
|
java.net.InetAddress |
getIPA(java.lang.String ipaStringName)
this returns an InetAddress based on a String name while checking for
exceptions.
|
java.net.ServerSocket |
getServerSocket(int port,
int backLog,
java.net.InetAddress ipa)
this returns a Server Socket while checking for exceptions.
|
java.net.Socket |
getSocket()
this returns a Socket while checking for exceptions.
|
java.net.Socket |
getSocket(java.lang.String host,
int port)
this returns a Socket while checking for exceptions.
|
java.lang.String |
ipaStringFormatter(java.lang.String rawIPAData)
this returns a formatted string product depicting an IPA with full
leading zero padding on a 12 character field with interspersed dots.
|
void |
setAgentCount(int count)
this sets the current agent count.
|
java.lang.String[] |
split(java.lang.String toSplit,
java.lang.String splitter,
int maxTerms)
this returns a string array built around matches of the given
parameters.
|
void |
template()
this method does nothing.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
private int agentCount
private static javax.net.ServerSocketFactory socketFactory
private static java.net.ServerSocket surrogateSocket
public MsgInterface messaging
public Server()
public Server(java.lang.String hostIPA, int commsPort, int backlog, int currentCount)
private void disconnect()
public void disconnect(java.net.Socket socket)
public void disconnect(java.net.ServerSocket socket)
public java.net.InetAddress getIPA(byte[] address)
public java.net.InetAddress getIPA(java.lang.String ipaStringName)
public java.net.ServerSocket getServerSocket(int port, int backLog, java.net.InetAddress ipa)
public java.net.Socket getSocket()
public java.net.Socket getSocket(java.lang.String host, int port)
public java.lang.String ipaStringFormatter(java.lang.String rawIPAData)
public void setAgentCount(int count)
public java.lang.String[] split(java.lang.String toSplit, java.lang.String splitter, int maxTerms)
public void template()