/*
 * @(#)UserServiceImpl_Skel.java
 *
 * Copyright 2006 Sony Corporation
 */

package info.dragonlady.cluster;

/**
 * ユーザ管理情報をクラスタリングサーバ間で共有する為のサーバ側スケルトンクラス。
 * 
 * RMIコンパイラによる自動生成ファイル。
 * 
 * @author Hiroshi.Ebata(INFOCITY)
 * @version $Revision: 1.3 $ $Date: 2006/03/10 14:28:48 $
 */
public final class UserServiceImpl_Skel
    implements java.rmi.server.Skeleton
{
    private static final java.rmi.server.Operation[] operations = {
	new java.rmi.server.Operation("boolean add(java.lang.String, java.lang.String)"),
	new java.rmi.server.Operation("java.util.Map get()"),
	new java.rmi.server.Operation("boolean remove(java.lang.String)"),
	new java.rmi.server.Operation("boolean removeByRelationId(java.lang.String)"),
	new java.rmi.server.Operation("void set(java.util.Map)")
    };
    
    private static final long interfaceHash = -3445262185807050204L;
    
    /**
     * スケルトンがサポートするオペレーションを返します。
     * 
     * @return Operation[] スケルトンがサポートするオペレーション
     * @see java.rmi.server.Skeleton#getOperations()
     */
    public java.rmi.server.Operation[] getOperations() {
	return (java.rmi.server.Operation[]) operations.clone();
    }
    
    /**
     * 引数を非整列化し、実際のリモートオブジェクトの実装を呼び出し、戻り値またはあらゆる例外を整列化します。
     * 
     * @param obj 呼び出しのディスパッチ先のリモートの実装
     * @param call リモート呼び出しを表すオブジェクト
     * @param opnum オペレーション番号
     * @param hash スタブまたはスケルトンのインタフェースハッシュ
     * @see java.rmi.server.Skeleton#dispatch(java.rmi.Remote, java.rmi.server.RemoteCall, int, long)
     */
    public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash)
	throws java.lang.Exception
    {
	if (opnum < 0) {
	    if (hash == -1748326657702671300L) {
		opnum = 0;
	    } else if (hash == 1702275998944278185L) {
		opnum = 1;
	    } else if (hash == -7371028326840638641L) {
		opnum = 2;
	    } else if (hash == -1977614195662247028L) {
		opnum = 3;
	    } else if (hash == 5112212046473305139L) {
		opnum = 4;
	    } else {
		throw new java.rmi.UnmarshalException("invalid method hash");
	    }
	} else {
	    if (hash != interfaceHash)
		throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
	}
	
	info.dragonlady.cluster.UserServiceImpl server = (info.dragonlady.cluster.UserServiceImpl) obj;
	switch (opnum) {
	case 0: // add(String, String)
	{
	    java.lang.String $param_String_1;
	    java.lang.String $param_String_2;
	    try {
		java.io.ObjectInput in = call.getInputStream();
		$param_String_1 = (java.lang.String) in.readObject();
		$param_String_2 = (java.lang.String) in.readObject();
	    } catch (java.io.IOException e) {
		throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
	    } catch (java.lang.ClassNotFoundException e) {
		throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
	    } finally {
		call.releaseInputStream();
	    }
	    boolean $result = server.add($param_String_1, $param_String_2);
	    try {
		java.io.ObjectOutput out = call.getResultStream(true);
		out.writeBoolean($result);
	    } catch (java.io.IOException e) {
		throw new java.rmi.MarshalException("error marshalling return", e);
	    }
	    break;
	}
	    
	case 1: // get()
	{
	    call.releaseInputStream();
	    java.util.Map $result = server.get();
	    try {
		java.io.ObjectOutput out = call.getResultStream(true);
		out.writeObject($result);
	    } catch (java.io.IOException e) {
		throw new java.rmi.MarshalException("error marshalling return", e);
	    }
	    break;
	}
	    
	case 2: // remove(String)
	{
	    java.lang.String $param_String_1;
	    try {
		java.io.ObjectInput in = call.getInputStream();
		$param_String_1 = (java.lang.String) in.readObject();
	    } catch (java.io.IOException e) {
		throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
	    } catch (java.lang.ClassNotFoundException e) {
		throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
	    } finally {
		call.releaseInputStream();
	    }
	    boolean $result = server.remove($param_String_1);
	    try {
		java.io.ObjectOutput out = call.getResultStream(true);
		out.writeBoolean($result);
	    } catch (java.io.IOException e) {
		throw new java.rmi.MarshalException("error marshalling return", e);
	    }
	    break;
	}
	    
	case 3: // removeByRelationId(String)
	{
	    java.lang.String $param_String_1;
	    try {
		java.io.ObjectInput in = call.getInputStream();
		$param_String_1 = (java.lang.String) in.readObject();
	    } catch (java.io.IOException e) {
		throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
	    } catch (java.lang.ClassNotFoundException e) {
		throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
	    } finally {
		call.releaseInputStream();
	    }
	    boolean $result = server.removeByRelationId($param_String_1);
	    try {
		java.io.ObjectOutput out = call.getResultStream(true);
		out.writeBoolean($result);
	    } catch (java.io.IOException e) {
		throw new java.rmi.MarshalException("error marshalling return", e);
	    }
	    break;
	}
	    
	case 4: // set(Map)
	{
	    java.util.Map $param_Map_1;
	    try {
		java.io.ObjectInput in = call.getInputStream();
		$param_Map_1 = (java.util.Map) in.readObject();
	    } catch (java.io.IOException e) {
		throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
	    } catch (java.lang.ClassNotFoundException e) {
		throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
	    } finally {
		call.releaseInputStream();
	    }
	    server.set($param_Map_1);
	    try {
		call.getResultStream(true);
	    } catch (java.io.IOException e) {
		throw new java.rmi.MarshalException("error marshalling return", e);
	    }
	    break;
	}
	    
	default:
	    throw new java.rmi.UnmarshalException("invalid method number");
	}
    }
}
