Initial commit from SVN.
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.foundation.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.common.io.IObjectInputStream;
|
||||
import com.common.io.IObjectOutputStream;
|
||||
|
||||
/**
|
||||
* A reflection operation result indicating the success of the operation and providing any available result.
|
||||
*/
|
||||
public class ReflectionSuccess extends ReflectionResult {
|
||||
/** The optional result object reference. */
|
||||
private Object result = null;
|
||||
/**
|
||||
* ReflectionSuccess constructor.
|
||||
* @param result The result of the synchronization, if there is one.
|
||||
*/
|
||||
public ReflectionSuccess() {
|
||||
}//ReflectionSuccess()//
|
||||
/**
|
||||
* ReflectionSuccess constructor.
|
||||
* @param result The result of the synchronization, if there is one.
|
||||
*/
|
||||
public ReflectionSuccess(Object result) {
|
||||
this.result = result;
|
||||
}//ReflectionSuccess()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.foundation.controller.ReflectionResult#getResultType()
|
||||
*/
|
||||
public int getResultType() {
|
||||
return RESULT_TYPE_SUCCESS;
|
||||
}//getResultType()//
|
||||
/**
|
||||
* Gets the result of the operation.
|
||||
* @return The optional result object reference.
|
||||
*/
|
||||
public Object getResult() {
|
||||
return result;
|
||||
}//getResult()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.common.io.IExternalizable#readExternal(com.common.io.IObjectInputStream)
|
||||
*/
|
||||
public Object readExternal(IObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||
result = in.readObject();
|
||||
return null;
|
||||
}//readExternal()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.common.io.IExternalizable#writeExternal(com.common.io.IObjectOutputStream)
|
||||
*/
|
||||
public void writeExternal(IObjectOutputStream out) throws IOException {
|
||||
out.writeObject(result);
|
||||
}//writeExternal()//
|
||||
}//ReflectionSuccess//
|
||||
Reference in New Issue
Block a user