RemoteInvocation.java from Texai at Krugle
Show RemoteInvocation.java syntax highlighted
/*
* RemoteInvocation.java
*
* Created on April 24, 2007, 1:37 PM
*
* Description: Provides a remote method invocation.
*
* Copyright (C) April 24, 2007 Stephen L. Reed, ported to ApacheMQ and derived from
* substantially the same class written by Vitaly Tsaplin, 2007, http://jmsrmi.sourceforge.net/
*
* This program is free software; you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program;
* if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package org.texai.kb.ejb.jmsrmi;
import java.lang.reflect.Method;
/**
* @author vtsaplin
*
*/
public class RemoteInvocation extends RemoteTransferObject {
/** the remote method name */
private String methodName;
/** the remote method arguments */
private Object [] args;
/** Creates a new RemoteInvocation instance. */
public RemoteInvocation() {
super(0);
}
/** Creates a new RemoteInvocation instance.
*
* @param id the remote invocation id
* @param method the remote method
* @param args the remote method arguments
*/
public RemoteInvocation(final long id, final Method method, final Object[] args) {
super(id);
//Preconditions
assert method != null : "method must not be null";
this.methodName = method.getName();
this.args = args;
}
/** Gets the remote method name.
*
* @return the remote method name
*/
public String getName() {
return methodName;
}
/** Gets the remote method arguments.
*
* @return the remote method arguments
*/
public Object [] getArgs() {
return args;
}
}
See more files for this project here