[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/marshal ...
Ron Sigal
ron_sigal at yahoo.com
Sat Feb 3 00:22:43 EST 2007
User: rsigal
Date: 07/02/03 00:22:43
Added: src/main/org/jboss/remoting/marshal
PreferredStreamMarshaller.java
PreferredStreamUnMarshaller.java
Log:
JBREM-692: Two interfaces are added that represent marshallers able to construct their preferred streams.
Revision Changes Path
1.2 +43 -0 JBossRemoting/src/main/org/jboss/remoting/marshal/PreferredStreamMarshaller.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PreferredStreamMarshaller.java
===================================================================
RCS file: PreferredStreamMarshaller.java
diff -N PreferredStreamMarshaller.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ PreferredStreamMarshaller.java 3 Feb 2007 05:22:43 -0000 1.2
@@ -0,0 +1,43 @@
+package org.jboss.remoting.marshal;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Map;
+
+
+/**
+ * A PreferedStreamMarshaller can create from a raw OutputStream the
+ * particular OutputStream it prefers to use.
+ *
+ * @author <a href="mailto:ron.sigal at jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.2 $
+ * <p>
+ * Copyright (c) Jan 26, 2007
+ * </p>
+ */
+
+public interface PreferredStreamMarshaller extends SerialMarshaller
+{
+ /**
+ * An application that calls getMarshallingStream() should provide a
+ * basic OutputStream, e.g., SocketOutputStream, which can be wrapped
+ * to provide the facilities desired by the PreferredStreamMarshaller.
+ *
+ * @param outputStream a raw OutputStream
+ * @return the OutputStream to be used for marshalling
+ * @throws IOException if it unable to create OutputStream
+ */
+ OutputStream getMarshallingStream(OutputStream outputStream) throws IOException;
+
+ /**
+ * An application that calls getMarshallingStream() should provide a
+ * basic OutputStream, e.g., SocketOutputStream, which can be wrapped
+ * to provide the facilities desired by the PreferredStreamMarshaller.
+ *
+ * @param outputStream a raw OutputStream
+ * @param config a Map with configuration information (e.g., serialization type)
+ * @return the OutputStream to be used for marshalling
+ * @throws IOException if it unable to create OutputStream
+ */
+ OutputStream getMarshallingStream(OutputStream outputStream, Map config) throws IOException;
+}
\ No newline at end of file
1.2 +68 -0 JBossRemoting/src/main/org/jboss/remoting/marshal/PreferredStreamUnMarshaller.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PreferredStreamUnMarshaller.java
===================================================================
RCS file: PreferredStreamUnMarshaller.java
diff -N PreferredStreamUnMarshaller.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ PreferredStreamUnMarshaller.java 3 Feb 2007 05:22:43 -0000 1.2
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+/*
+ * Created on Jan 26, 2007
+ */
+package org.jboss.remoting.marshal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+
+/**
+ * A PreferedStreamUnMarshaller can create from a raw InputStream the
+ * particular InputStream it prefers to use
+
+ * @author <a href="mailto:ron.sigal at jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.2 $
+ * <p>
+ * Copyright (c) Jan 26, 2007
+ * </p>
+ */
+
+public interface PreferredStreamUnMarshaller extends SerialUnMarshaller
+{
+ /**
+ * An application that calls getMarshallingStream() should provide a
+ * basic InpputStream, e.g., SocketIntputStream, which can be wrapped
+ * to provide the facilities desired by the PreferredStreamUnMarshaller.
+ *
+ * @param inputStream a raw IntputStream
+ * @return the InputStream to be used for marshalling
+ * @throws IOException if unable to create InputStream
+ */
+ InputStream getMarshallingStream(InputStream inputStream) throws IOException;
+
+ /**
+ * An application that calls getMarshallingStream() should provide a
+ * basic InpputStream, e.g., SocketIntputStream, which can be wrapped
+ * to provide the facilities desired by the PreferredStreamUnMarshaller.
+ *
+ * @param inputStream a raw IntputStream
+ * @param config a Map with configuration information (e.g., serialization type)
+ * @return the InputStream to be used for marshalling
+ * @throws IOException if unable to create InputStream
+ */
+ InputStream getMarshallingStream(InputStream inputStream, Map config) throws IOException;
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list