at.spardat.xma.baserpc.ClientToServerData Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* s IT Solutions AT Spardat GmbH - initial API and implementation
*******************************************************************************/
//@(#) $Id: ClientToServerData.java 2089 2007-11-28 13:56:13Z s3460 $
package at.spardat.xma.baserpc;
import java.io.IOException;
import at.spardat.enterprise.exc.SysException;
import at.spardat.xma.serializer.XmaInput;
import at.spardat.xma.serializer.XmaOutput;
/**
* Models the data sent from client to server in a base rpc.
*
* @author YSD, 28.09.2004
*/
public class ClientToServerData extends RemoteData {
/**
* The name of the RPC
*/
private String fName;
/**
* Returns the name of the RPC.
*/
public String getName () {
return fName;
}
/**
* Sets the name of the RPC.
*/
void setName (String name) {
fName = name;
}
/**
* @see at.spardat.xma.baserpc.RemoteData#externalize(XmaOutput)
*/
protected void externalize (XmaOutput o) throws IOException {
if (fName == null) throw new SysException ("fname must not be null");
o.writeString ("name", fName);
super.externalize(o);
}
/**
* @see at.spardat.xma.baserpc.RemoteData#internalize(XmaInput)
*/
protected void internalize (XmaInput in) throws IOException, ClassNotFoundException {
fName = in.readString();
super.internalize(in);
}
}