|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ssonet.net.impl.SSONETProtocolImpl
Field Summary | |
(package private) org.ssonet.io.IOStream |
basicIOStream
The basic IOStream taken directly from the network socket (the IOStream, which is supplied, when the SSONETProtocolStream is initialized) |
(package private) org.ssonet.net.SSONETContext |
context
|
(package private) org.ssonet.util.ByteFIFO |
dataBuffer
|
(package private) int |
DATABUFFER_SIZE
|
static boolean |
debug
|
(package private) boolean |
EOF
|
(package private) java.io.IOException |
initException
|
(package private) boolean |
initFinished
|
(package private) org.ssonet.io.IOStream |
ioStream
The working ioStream |
(package private) boolean |
isProtocolMode
|
(package private) boolean |
isServer
|
(package private) int |
negotiationRequested
|
(package private) org.ssonet.io.IOStream |
newIOStream
The IOStream created by a new negotiation |
(package private) java.lang.Thread |
protocolThread
|
(package private) java.io.IOException |
readException
|
(package private) boolean |
readingFinished
|
(package private) java.lang.Object |
readSynchronizer
|
protected org.ssonet.net.PhaseTwoResult |
securityGoalNegotiationResult
Result of the security goal negotiation |
(package private) boolean |
waitForFirstNegotiationRequest
|
(package private) boolean |
waitForStreamChange
|
(package private) java.io.IOException |
writeException
|
(package private) java.lang.Object |
writeSynchronizer
|
Constructor Summary | |
SSONETProtocolImpl(org.ssonet.io.IOStream ioStream,
org.ssonet.net.SSONETContext context,
boolean isServer)
initializes a new SSONETProtocolStream. |
Method Summary | |
int |
available()
|
void |
closeIn()
Closes the Inputstream. |
void |
closeOut()
Closes the outputStream. |
int |
getConnectionState()
Returns the state the connection is in. |
org.ssonet.net.PhaseTwoResult |
getSecurityGoalNegotiationResult()
Get the result of the security goal negotiation |
int |
read(byte[] buffer)
Reads an array of bytes from a stream |
void |
requestMechanismNegotiation()
This method can be called by an application to request a new mechanism negotation. |
void |
requestSecurityGoalNegotiation()
This method can be called by an application to request a new security goal and a directly following mechanism negotation. |
void |
run()
Processes messages for the ssonet protocol |
void |
setConnectionState(int connectionState)
Don't call. |
void |
setSecurityGoalNegotiationResult(org.ssonet.net.PhaseTwoResult ptr)
Set the result of the security goal negotiation |
protected void |
waitInitFinished()
Waits until the first negotiation is finished. |
void |
write(byte[] buffer)
Writes an array of bytes to a stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean debug
protected org.ssonet.net.PhaseTwoResult securityGoalNegotiationResult
org.ssonet.net.SSONETContext context
boolean isServer
boolean isProtocolMode
org.ssonet.io.IOStream ioStream
org.ssonet.io.IOStream newIOStream
org.ssonet.io.IOStream basicIOStream
boolean EOF
java.io.IOException readException
java.lang.Object readSynchronizer
java.io.IOException writeException
java.lang.Object writeSynchronizer
java.lang.Thread protocolThread
boolean initFinished
java.io.IOException initException
boolean waitForStreamChange
org.ssonet.util.ByteFIFO dataBuffer
int DATABUFFER_SIZE
int negotiationRequested
boolean waitForFirstNegotiationRequest
boolean readingFinished
Constructor Detail |
public SSONETProtocolImpl(org.ssonet.io.IOStream ioStream, org.ssonet.net.SSONETContext context, boolean isServer)
isServer
- true, if it is the server side, false, if it is the client side.Method Detail |
public org.ssonet.net.PhaseTwoResult getSecurityGoalNegotiationResult()
public void setSecurityGoalNegotiationResult(org.ssonet.net.PhaseTwoResult ptr)
public void run()
run
in interface java.lang.Runnable
public int read(byte[] buffer) throws java.io.IOException
read
in interface IOStream
buffer
- the buffer, which shall be filled with bytes read
java.io.IOException
- if an error occures while reading from the streampublic void write(byte[] buffer) throws java.io.IOException
write
in interface IOStream
buffer
- the buffer holding the bytes to write to the stream
java.io.IOException
- if an error occures while writing to the streampublic void closeIn() throws java.io.IOException
closeIn
in interface IOStream
java.io.IOException
public void closeOut() throws java.io.IOException
closeOut
in interface IOStream
java.io.IOException
public int available() throws java.io.IOException
available
in interface IOStream
java.io.IOException
public void requestSecurityGoalNegotiation() throws java.io.IOException
requestSecurityGoalNegotiation
in interface SSONETProtocolStream
java.io.IOException
public void requestMechanismNegotiation() throws java.io.IOException
requestMechanismNegotiation
in interface SSONETProtocolStream
java.io.IOException
protected void waitInitFinished() throws java.io.IOException
java.io.IOException
public void setConnectionState(int connectionState)
SSONETProtocolStream
setConnectionState
in interface SSONETProtocolStream
connectionState
- new stateConnectionListener
public int getConnectionState()
SSONETProtocolStream
getConnectionState
in interface SSONETProtocolStream
ConnectionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |