From ff58300004b2dfa283650bda33b29f11e2821173 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 5 Aug 2018 21:35:04 +0300 Subject: xmpp server refactoring --- .../java/com/juick/server/xmpp/router/Stream.java | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/xmpp/router/Stream.java') 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; + } } -- cgit v1.2.3