diff options
author | 2018-08-05 21:35:04 +0300 | |
---|---|---|
committer | 2018-08-05 21:35:04 +0300 | |
commit | ff58300004b2dfa283650bda33b29f11e2821173 (patch) | |
tree | c9715da490904769f03cf754064be5b7251a6d90 /juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java | |
parent | 0d7dcb9c837bdd5f76f0f3202969d8b8a46b8d77 (diff) |
xmpp server refactoring
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java b/juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java index 7532443c..4319bee7 100644 --- a/juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java +++ b/juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java @@ -45,7 +45,7 @@ public abstract class Stream { this.loggedIn = loggedIn; } - Jid from; + public Jid from; public Jid to; private InputStream is; private OutputStream os; @@ -69,7 +69,7 @@ public abstract class Stream { streamId = UUID.randomUUID().toString(); } - void restartStream() throws XmlPullParserException { + public void restartStream() throws XmlPullParserException { parser = factory.newPullParser(); parser.setInput(new InputStreamReader(is, StandardCharsets.UTF_8)); parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); @@ -181,4 +181,20 @@ public abstract class Stream { public void setUpdated() { this.updated = Instant.now(); } + + public InputStream getInputStream() { + return is; + } + + public void setInputStream(InputStream is) { + this.is = is; + } + + public OutputStream getOutputStream() { + return os; + } + + public void setOutputStream(OutputStream os) { + this.os = os; + } } |