link start!
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.tridium.websockets;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public interface WebSocket {
|
||||
void attachHandler(WebSocketEventHandler webSocketEventHandler);
|
||||
|
||||
void close(WebSocketCloseReason webSocketCloseReason, byte[] bArr) throws IOException;
|
||||
|
||||
WebSocketContext getContext();
|
||||
|
||||
String getKey();
|
||||
|
||||
WebSocketState getState();
|
||||
|
||||
void handshake() throws HandshakeException;
|
||||
|
||||
byte[] parse() throws IOException, SocketClosedException;
|
||||
|
||||
void send(byte[] bArr) throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.tridium.websockets;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import javax.baja.sys.Context;
|
||||
|
||||
public interface WebSocketContext extends Context {
|
||||
InputStream getInputStream() throws IOException;
|
||||
|
||||
OutputStream getOutputStream() throws IOException;
|
||||
|
||||
String getRemoteHost();
|
||||
|
||||
String getRequestURI();
|
||||
|
||||
String getScheme();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.tridium.websockets;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.baja.web.WebOp;
|
||||
|
||||
public interface WebSocketFactory {
|
||||
WebSocket getWebSocket(WebOp webOp) throws NoSocketsAvailableException, HandshakeException, IOException;
|
||||
|
||||
void shutdown();
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.tridium.websockets.niagara;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
public interface WebSocketMessage {
|
||||
|
||||
public interface Frame {
|
||||
byte[] getBytes();
|
||||
|
||||
byte getOpcode();
|
||||
|
||||
int getPayloadLength();
|
||||
|
||||
boolean getRSV1();
|
||||
|
||||
boolean getRSV2();
|
||||
|
||||
boolean getRSV3();
|
||||
|
||||
boolean isFin();
|
||||
|
||||
boolean isMask();
|
||||
}
|
||||
|
||||
void write(OutputStream outputStream) throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.tridium.websockets.router;
|
||||
|
||||
public interface SocketRegistrationFactory {
|
||||
SocketRegistration createSocketRegistration(String str);
|
||||
}
|
||||
Reference in New Issue
Block a user