**javacard.framework.service** ====Class CardRemoteObject ==== *[[javacard:java-card-api:object|java.lang.Object]] \\ **All Implemented Interfaces:** [[javacard:java-card-api:Remote|Remote]] ---- public class **CardRemoteObject**extends [[javacard:java-card-api:Object|Object]] implements [[javacard:java-card-api:Remote|Remote]] A convenient base class for remote objects for the Java Card platform. An instance of a subclass of this CardRemoteObject class will be exported automatically upon construction. **Version:** 1.0 ---- ^ Constructor Summary ^^ | **[[javacard:java-card-api:CardRemoteObject#CardRemoteObject()|CardRemoteObject]] **()          Creates a new CardRemoteObject and automatically exports it. |   ^ Method Summary ^^ | **static void** | **[[javacard:java-card-api:CardRemoteObject#export(java.rmi.Remote)|export]] **([[javacard:java-card-api:Remote|Remote]]  obj)          Exports the specified remote object. | | **static void** | **[[javacard:java-card-api:CardRemoteObject#unexport(java.rmi.Remote)|unexport]] **([[javacard:java-card-api:Remote|Remote]]  obj)          Unexports the specified remote object. |   ^ Methods inherited from class java.lang.Object ^ | [[javacard:java-card-api:Object#equals(java.lang.Object)|equals]] |   ^ Constructor Detail ^ === CardRemoteObject === public **CardRemoteObject**() Creates a new CardRemoteObject and automatically exports it. When exported, the object is enabled for remote access from outside the card until unexported. Only when the object is enabled for remote access can it be returned as the initial reference during selection or returned by a remote method. In addition, remote methods can be invoked only on objects enabled for remote access. ^ Method Detail ^ === export === public static void **export**([[javacard:java-card-api:Remote|Remote]]  obj) throws [[javacard:java-card-api:SecurityException|SecurityException]] Exports the specified remote object. The object is now enabled for remote access from outside the card until unexported. In order to remotely access the remote object from the terminal client, it must either be set as the initial reference or be returned by a remote method. **Parameters:**obj - the remotely accessible object **Throws:** [[javacard:java-card-api:SecurityException|SecurityException]] - if the specified obj parameter is not owned by the caller context [[javacard:java-card-api:SystemException|SystemException]] - with the following reason codes: \\ *SystemException.NO_RESOURCE if too many exported remote objects. All implementations must support a minimum of 16 exported remote objects. \\ ---- === unexport === public static void **unexport**([[javacard:java-card-api:Remote|Remote]]  obj) throws [[javacard:java-card-api:SecurityException|SecurityException]] Unexports the specified remote object. After applying this method, the object cannot be remotely accessed from outside the card until it is exported again. Note: \\ *//If this method is called during the session in which the specified remote object parameter is the initial reference object or has been returned by a remote method, the specified remote object will continue to be remotely accessible until the end of the associated selection session(s).// \\ **Parameters:**obj - the remotely accessible object **Throws:** [[javacard:java-card-api:SecurityException|SecurityException]] - if the specified obj parameter is not owned by the caller context