org.objectweb.carol.rmi.jrmp.interceptor
Class JServerInterceptorHelper

java.lang.Object
  extended by org.objectweb.carol.rmi.jrmp.interceptor.JInterceptorHelper
      extended by org.objectweb.carol.rmi.jrmp.interceptor.JServerInterceptorHelper

public class JServerInterceptorHelper
extends JInterceptorHelper

Class JServerInterceptorHelper is the CAROL JRMP Server Interceptor Helper this class is used by the other pakage class to manage server interception

Version:
1.0, 15/07/200
Author:
Guillaume Riviere (Guillaume.Riviere@inrialpes.fr)

Field Summary
 
Fields inherited from class org.objectweb.carol.rmi.jrmp.interceptor.JInterceptorHelper
ia, LOCAL_CTX, NO_CTX, REMOTE_CTX, spaceID
 
Constructor Summary
JServerInterceptorHelper()
           
 
Method Summary
static JServerRequestInfo getRequestServerContextFromInput(java.io.ObjectInput in, int ctxValue, JServerRequestInfo jsr)
          Get Context from Object Input
static boolean isLocal()
          is Local Reference
static void receive_request(java.io.ObjectInput in, JServerRequestInterceptor[] sis)
          Receive request
static void send_exception(java.io.ObjectOutput out, JServerRequestInterceptor[] sis)
          send exception with context
static void send_other(java.io.ObjectOutput out, JServerRequestInterceptor[] sis)
           
static void send_reply(java.io.ObjectOutput out, JServerRequestInterceptor[] sis)
          send reply with context
static void setLocal()
          Set Local Reference
static void setServerContextInOutput(java.io.ObjectOutput out, JServerRequestInfo ri, boolean locRef)
          Set Context inObject Outut
 
Methods inherited from class org.objectweb.carol.rmi.jrmp.interceptor.JInterceptorHelper
getInetAddress, getSpaceID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JServerInterceptorHelper

public JServerInterceptorHelper()
Method Detail

receive_request

public static void receive_request(java.io.ObjectInput in,
                                   JServerRequestInterceptor[] sis)
                            throws java.io.IOException
Receive request

Parameters:
ObjectInput - in
JServerRequestInterceptor - All interceptor for this context
Throws:
java.io.IOException - if an exception occur with the ObjectOutput

send_reply

public static void send_reply(java.io.ObjectOutput out,
                              JServerRequestInterceptor[] sis)
                       throws java.io.IOException
send reply with context

Parameters:
ObjectOutput - out
JServerRequestInterceptor - All interceptor for this context
Throws:
java.io.IOException - if an exception occur with the ObjectOutput

send_exception

public static void send_exception(java.io.ObjectOutput out,
                                  JServerRequestInterceptor[] sis)
                           throws java.io.IOException
send exception with context

Parameters:
ObjectOutput - out
JServerRequestInterceptor - All interceptor for this context
Throws:
java.io.IOException - if an exception occur with the ObjectOutput

send_other

public static void send_other(java.io.ObjectOutput out,
                              JServerRequestInterceptor[] sis)
                       throws java.io.IOException
Throws:
java.io.IOException

getRequestServerContextFromInput

public static JServerRequestInfo getRequestServerContextFromInput(java.io.ObjectInput in,
                                                                  int ctxValue,
                                                                  JServerRequestInfo jsr)
                                                           throws java.lang.ClassNotFoundException,
                                                                  java.io.IOException
Get Context from Object Input

Parameters:
ObjectInput - in the object input stream
int - the context value
boolean - do not build Request Info
Throws:
java.lang.ClassNotFoundException
java.io.IOException

setServerContextInOutput

public static void setServerContextInOutput(java.io.ObjectOutput out,
                                            JServerRequestInfo ri,
                                            boolean locRef)
                                     throws java.io.IOException
Set Context inObject Outut

Parameters:
ObjectOutput - in the object OutPutStream
int - the context value
boolean - do not build Request Info
Throws:
java.io.IOException

setLocal

public static void setLocal()
Set Local Reference


isLocal

public static boolean isLocal()
is Local Reference

Returns:
true if local reference