[brlcad-commits] SF.net SVN: brlcad:[43187] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geo
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <dav...@us...> - 2011-02-09 20:23:55
|
Revision: 43187 http://brlcad.svn.sourceforge.net/brlcad/?rev=43187&view=rev Author: davidloman Date: 2011-02-09 20:23:48 +0000 (Wed, 09 Feb 2011) Log Message: ----------- Implement NewSessionReqMsg in java. Added Paths: ----------- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/NewSessionReqMsg.java Added: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/NewSessionReqMsg.java =================================================================== --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/NewSessionReqMsg.java (rev 0) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/NewSessionReqMsg.java 2011-02-09 20:23:48 UTC (rev 43187) @@ -0,0 +1,95 @@ +/* + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library 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 file; see the file named COPYING for more + * information. + */ +/** @file NewSessionReqMsg.java + * + */ +package org.brlcad.geometryservice.net.msg; + +import org.brlcad.geometryservice.net.ByteBufferReader; +import org.brlcad.geometryservice.net.ByteBufferWriter; + +/** + * @author david.h.loman + * + */ +public class NewSessionReqMsg extends AbstractNetMsg { + + private String uname; + private String passwd; + + /** + * @param msgType + */ + public NewSessionReqMsg(String uname, String passwd) { + super(NetMsgTypes.NewSessionREQ); + this.uname = uname; + this.passwd = passwd; + } + + /** + * @param msgType + * @param reMsg + */ + public NewSessionReqMsg(AbstractNetMsg reMsg, String uname, String passwd) { + super(NetMsgTypes.NewSessionREQ, reMsg); + this.uname = uname; + this.passwd = passwd; + } + + /** + * @param msgType + * @param reader + */ + public NewSessionReqMsg(ByteBufferReader reader) { + super(NetMsgTypes.NewSessionREQ, reader); + } + + /** + * @see org.brlcad.geometryservice.net.msg.AbstractNetMsg#_deserialize(org.brlcad.geometryservice.net.ByteBufferReader) + */ + @Override + protected void _deserialize(ByteBufferReader reader) { + this.uname = reader.getString(); + this.passwd = reader.getString(); + } + + /** + * @see org.brlcad.geometryservice.net.msg.AbstractNetMsg#_serialize(org.brlcad.geometryservice.net.ByteBufferWriter) + */ + @Override + protected void _serialize(ByteBufferWriter writer) { + writer.putString(this.uname); + writer.putString(this.passwd); + } + + /** + * @return the uname + */ + public final String getUname() { + return uname; + } + + /** + * @return the passwd + */ + public final String getPasswd() { + return passwd; + } +} Property changes on: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/NewSessionReqMsg.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |