Package java.rmi

Examples of java.rmi.Remote


   * @see #lookupStub
   */
  public void prepare() throws RemoteLookupFailureException {
    // Cache RMI stub on initialization?
    if (this.lookupStubOnStartup) {
      Remote remoteObj = lookupStub();
      if (logger.isDebugEnabled()) {
        if (remoteObj instanceof RmiInvocationHandler) {
          logger.debug("RMI stub [" + getServiceUrl() + "] is an RMI invoker");
        }
        else if (getServiceInterface() != null) {
View Full Code Here


   * @see #setCacheStub
   * @see java.rmi.Naming#lookup
   */
  protected Remote lookupStub() throws RemoteLookupFailureException {
    try {
      Remote stub = null;
      if (this.registryClientSocketFactory != null) {
        // RMIClientSocketFactory specified for registry access.
        // Unfortunately, due to RMI API limitations, this means
        // that we need to parse the RMI URL ourselves and perform
        // straight LocateRegistry.getRegistry/Registry.lookup calls.
View Full Code Here

   * @see java.rmi.ConnectException
   * @see java.rmi.ConnectIOException
   * @see java.rmi.NoSuchObjectException
   */
  public Object invoke(MethodInvocation invocation) throws Throwable {
    Remote stub = getStub();
    try {
      return doInvoke(invocation, stub);
    }
    catch (RemoteConnectFailureException ex) {
      return handleRemoteConnectFailure(invocation, ex);
View Full Code Here

   * @return the invocation result, if any
   * @throws Throwable in case of invocation failure
   * @see #invoke
   */
  protected Object refreshAndRetry(MethodInvocation invocation) throws Throwable {
    Remote freshStub = null;
    synchronized (this.stubMonitor) {
      this.cachedStub = null;
      freshStub = lookupStub();
      if (this.cacheStub) {
        this.cachedStub = freshStub;
View Full Code Here

   * @see #lookupStub
   */
  public void prepare() throws RemoteLookupFailureException {
    // Cache RMI stub on initialization?
    if (this.lookupStubOnStartup) {
      Remote remoteObj = lookupStub();
      if (logger.isDebugEnabled()) {
        if (remoteObj instanceof RmiInvocationHandler) {
          logger.debug("JNDI RMI object [" + getJndiName() + "] is an RMI invoker");
        }
        else if (getServiceInterface() != null) {
View Full Code Here

   * @see java.rmi.ConnectException
   * @see java.rmi.ConnectIOException
   * @see java.rmi.NoSuchObjectException
   */
  public Object invoke(MethodInvocation invocation) throws Throwable {
    Remote stub = null;
    try {
      stub = getStub();
    }
    catch (NamingException ex) {
      throw new RemoteLookupFailureException("JNDI lookup for RMI service [" + getJndiName() + "] failed", ex);
View Full Code Here

   * @return the invocation result, if any
   * @throws Throwable in case of invocation failure
   * @see #invoke
   */
  protected Object refreshAndRetry(MethodInvocation invocation) throws Throwable {
    Remote freshStub = null;
    synchronized (this.stubMonitor) {
      this.cachedStub = null;
      freshStub = lookupStub();
      if (this.cacheStub) {
        this.cachedStub = freshStub;
View Full Code Here

   * @see #lookupStub
   */
  public void prepare() throws RemoteLookupFailureException {
    // Cache RMI stub on initialization?
    if (this.lookupStubOnStartup) {
      Remote remoteObj = lookupStub();
      if (logger.isDebugEnabled()) {
        if (remoteObj instanceof RmiInvocationHandler) {
          logger.debug("RMI stub [" + getServiceUrl() + "] is an RMI invoker");
        }
        else if (getServiceInterface() != null) {
View Full Code Here

   * @see #setCacheStub
   * @see java.rmi.Naming#lookup
   */
  protected Remote lookupStub() throws RemoteLookupFailureException {
    try {
      Remote stub = null;
      if (this.registryClientSocketFactory != null) {
        // RMIClientSocketFactory specified for registry access.
        // Unfortunately, due to RMI API limitations, this means
        // that we need to parse the RMI URL ourselves and perform
        // straight LocateRegistry.getRegistry/Registry.lookup calls.
View Full Code Here

   * @see java.rmi.ConnectException
   * @see java.rmi.ConnectIOException
   * @see java.rmi.NoSuchObjectException
   */
  public Object invoke(MethodInvocation invocation) throws Throwable {
    Remote stub = getStub();
    try {
      return doInvoke(invocation, stub);
    }
    catch (RemoteConnectFailureException ex) {
      return handleRemoteConnectFailure(invocation, ex);
View Full Code Here

TOP

Related Classes of java.rmi.Remote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.