Package org.apache.etch.util

Examples of org.apache.etch.util.URL


    Log.addSink( null );
  }
 
  private PwAuth newPwAuth( String uri ) throws Exception
  {
    return new PwAuth( transport, new URL( uri ), resources );
  }
View Full Code Here


    ServerFactory listener = ClosingHelper.newListener( uri, null, new MainClosingListener() );

    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
   
    InetSocketAddress localAddr = (InetSocketAddress) listener.transportQuery( TcpListener.LOCAL_ADDRESS );
    URL u = new URL( "tcp:" );
    u.setHost( localAddr.getHostName() );
    u.setPort( localAddr.getPort() );
    localUri = u.toString();
  }
View Full Code Here

 
  private byte[] msg2bytes( Message msg, Boolean stringTypeAndField ) throws IOException
  {
    FlexBuffer buf = new FlexBuffer();
   
    URL u = new URL( "none:" );
    if (stringTypeAndField != null)
      u.addTerm( BinaryTaggedDataOutput.STRING_TYPE_AND_FIELD, stringTypeAndField );
   
    BinaryTaggedDataOutput btdo = new BinaryTaggedDataOutput( vf, u.toString() );
    btdo.writeMessage( msg, buf );
    buf.setIndex( 0 );
    return buf.getAvailBytes();
  }
View Full Code Here

      new MainInheritanceListener() );

    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
   
    InetSocketAddress localAddr = (InetSocketAddress) listener.transportQuery( TcpListener.LOCAL_ADDRESS );
    URL u = new URL( "tcp:" );
    u.setHost( localAddr.getHostName() );
    u.setPort( localAddr.getPort() );
    localUri = u.toString();
  }
View Full Code Here

   * @param uri
   * @param resources
   */
  public Tcp2Listener( String uri, Resources resources )
  {
    this( new URL( uri ), resources );
  }
View Full Code Here

{
  /** @throws Exception */
  @Test
  public void testImport() throws Exception
  {
    URL url = new URL( "scheme://user:pw@host:23/resource;s=1;t=2?p=3&q=4#frag" );
    test( url );
  }
View Full Code Here

    StructValue sv = helper.exportValue( vf, url );
//    System.out.println( "sv = "+sv );
   
    assertEquals( sv.type(), type );
   
    URL url2 = (URL) helper.importValue( sv );
//    System.out.println( "url2 = "+url2 );
   
    assertEquals( url, url2 );
  }
View Full Code Here

  }

 
  private Logger newLogger(String uri) throws Exception
  {
    return new Logger(transport,new URL(uri),null);
  }
View Full Code Here

    Log.addSink( null );
  }
 
  private KeepAlive newKeepAlive(String uri) throws Exception
  {
    return new KeepAlive(transport,new URL(uri),resources);
  }
View Full Code Here

    { CommandParser.class, Parameter.class, URL.class };

  @Override
  public Object convertValue( String value )
  {
    return new URL( value );
  }
View Full Code Here

TOP

Related Classes of org.apache.etch.util.URL

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.