public String toString() { if (profile != null) { return "ServerGIOPConnection to " + profile.toString() + " from " + orb.getBasicAdapter ().getEndpointProfiles () + " (" + Integer.toHexString(this.hashCode()) + ")"; } return super.toString(); }
/** * @deprecated This method cannot return a sensible result in the presence * of alternate transports, use {@link #getEndpointProfiles()} instead. */ @Deprecated public int getSSLPort() { IIOPListener listener = getIIOPListener(); if (listener != null) { return ((IIOPProfile)listener.endpoint()).getSSLPort(); } throw new RuntimeException("Non-IIOP transport does not have an SSL port"); }
public void turnOnBiDirGIOP() { if ( ! bidir_giop ) { bidir_giop = true; clientConnectionManager.setRequestListener( basicAdapter.getRequestListener() ); } }
public synchronized POA getRootPOA() throws org.omg.CORBA.INITIALIZE { if ( rootpoa == null ) { POA tmppoa = POA._POA_init(this); tmppoa = org.jacorb.poa.POA._POA_init(this); basicAdapter = new BasicAdapter( this, tmppoa, getTransportManager(), giop_connection_manager ); try { tmppoa.configure(configuration); basicAdapter.configure(configuration); } catch ( ConfigurationException ce ) { throw SystemExceptionHelper.embedCause(new INITIALIZE("ConfigurationException: " + ce.toString()), ce); } rootpoa = tmppoa; rootpoa._addPOAEventListener( this ); } return rootpoa; }
/** * Sends the reply of the given request via the BasicAdapter. */ void returnResult(ServerRequest request) { orb.getBasicAdapter().return_result(request); }
/** * @deprecated This method cannot return a sensible result in the presence * of alternate transports, use {@link #getEndpointProfiles()} instead. */ @Deprecated public boolean hasSSLListener() { return getSSLPort() != -1; }
/** * template method that is invoked when * an exception occurs during the run loop. */ private void handleExceptionInRunLoop(Exception exception, boolean isTerminated) { if (!isTerminated) { logger.warn("unexpected exception in " + info + "Acceptor runloop", exception); } doHandleExceptionInRunLoop(exception, isTerminated); try { acceptorExceptionListener.exceptionCaught ( new AcceptorExceptionEvent ( this, ((BasicAdapter) up).getORB(), exception ) ); } catch(Exception e) { logger.error("error in Acceptor Exception Listener: " + acceptorExceptionListener + " while handling exception: " + exception, e); } }
for (Iterator<Factories> i = getListenerFactories().iterator(); i.hasNext();)
orb.getBasicAdapter().deliverRequest(request, poa); requestQueue.removeFirst();
/** * this method calls the basic adapter and hands out the request if * something went wrong, the specified system exception will set */ void rejectRequest(ServerRequest request, org.omg.CORBA.SystemException exception) { if (exception != null) request.setSystemException(exception); orb.getBasicAdapter().return_result(request); if (logger.isWarnEnabled()) { logger.warn("rid: " + request.requestId() + " opname: " + request.operation() + " request rejected with exception: " + exception.getMessage()); } }
new SSL ( (short)supported, (short)required, (short)orb.getBasicAdapter().getSSLPort());
List<Profile> eplist = getBasicAdapter().getEndpointProfiles(); for (Iterator<Profile> i = eplist.iterator(); i.hasNext(); )
/** * @deprecated This method cannot return a sensible result in the presence * of alternate transports, use {@link #getEndpointProfiles()} instead. */ @Deprecated public int getPort() { IIOPListener l = getIIOPListener(); if (l != null) { IIOPProfile profile = (IIOPProfile)l.endpoint(); return ((IIOPAddress)profile.getAddress()).getPort(); } throw new RuntimeException("Cannot find server port for non-IIOP transport"); }
public void send_request( ClientRequestInfo ri ) throws ForwardRequest { //only send a BiDir service context if our orb allows it, and //the connection was initiated in this process and if this is not // a local call. if( !orb.useBiDirGIOP() || ((ClientRequestInfoImpl) ri).isLocalInterceptor() || !((ClientRequestInfoImpl) ri).getConnection().isClientInitiated() ) { return; } if( bidir_ctx == null ) { init_bidir_ctx (); } if ( !((ClientRequestInfoImpl) ri).getConnection().isListenPointListSent() ) { ri.add_request_service_context( bidir_ctx, true ); } //if this connection isn't "bidir'ed" yet, do so now GIOPConnection conn = ((ClientRequestInfoImpl) ri).getConnection().getGIOPConnection(); if(conn.getRequestListener() instanceof NoBiDirClientRequestListener) { conn.setRequestListener(orb.getBasicAdapter().getRequestListener()); } }
List<Profile> endpoints = ba.getEndpointProfiles();
/** * @deprecated This method cannot return a sensible result in the presence * of alternate transports, use {@link #getEndpointProfiles()} instead. */ @Deprecated public String getAddress() { IIOPListener l = getIIOPListener(); if (l != null) { IIOPProfile profile = (IIOPProfile)l.endpoint(); return ((IIOPAddress)profile.getAddress()).getHostName(); } throw new RuntimeException("Cannot find server address for non-IIOP transport"); }
int[] profileTags = new int[basicAdapter.getEndpointProfiles().size()]; int n = 0; for (Iterator<Profile> i = basicAdapter.getEndpointProfiles().iterator(); i.hasNext();)