Package org.rspeer.game.web.net
Class Session
- java.lang.Object
-
- org.rspeer.game.web.net.Session
-
- All Implemented Interfaces:
AutoCloseable
public class Session extends Object implements AutoCloseable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
<T> T
read(Class<T> clazz, com.google.gson.Gson gson)
void
write(RequestType type, Request object, com.google.gson.Gson gson)
-
-
-
Constructor Detail
-
Session
public Session(Socket socket) throws IOException
- Throws:
IOException
-
-
Method Detail
-
write
public void write(RequestType type, Request object, com.google.gson.Gson gson) throws IOException
- Throws:
IOException
-
read
public <T> T read(Class<T> clazz, com.google.gson.Gson gson) throws IOException
- Throws:
IOException
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-