oodt-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Foster <holeno...@mac.com>
Subject Re: Question about how to assign a port number to its protocol in pushpull
Date Mon, 06 Aug 2012 17:52:25 GMT
hey yunhee,

like chris said i would use the java properties he defined and modify the following class
to set port to it by default to it:

https://svn.apache.org/repos/asf/oodt/trunk/protocol/sftp/src/main/java/org/apache/oodt/cas/protocol/sftp/JschSftpProtocolFactory.java

your change would probably look something like:

public class JschSftpProtocolFactory implements ProtocolFactory {

   public static final String PORT_PROPERTY = "org.apache.oodt.cas.protocol.sftp.port";

   private int port;

   public JschSftpProtocolFactory() {
     port = System.getProperty(PORT_PROPERTY, -1);
   } 

 ....
}

up can then add the property (commented out) to:

https://svn.apache.org/repos/asf/oodt/trunk/pushpull/src/main/resources/push_pull_framework.properties 

-brian

On Aug 06, 2012, at 08:13 AM, "Mattmann, Chris A (388J)" <chris.a.mattmann@jpl.nasa.gov>
wrote:

Hi YunHee,

On Aug 6, 2012, at 5:20 AM, YunHee Kang wrote:

> Hi Chris,
> 
> I am writing to you to ask you about how to apply a port number in a
> property file of the pushpull framework.
> Until now I didn't find how to do that in the push-pull user manual
> written by Brian.
> 
> I think that we usually use a well-know port number assigned to a
> specific protocol. For instance the number 22 belongs to scp.
> But sometimes we use a different port number, instead of common port
> number, cause of a security reason.
> On the other hand, we also need to consider how to describe a port
> number that is assigned to a new protocol if we develop the protocol.

I think the best way to do this would be to:

1. Suggest a system property inside of the push_pull_framework.properties
file, e.g., org.apache.oodt.cas.protocol.sftp.portNum
2. To flow that system property down into the protocol API layer (e.g., expect
it to be read and set by the Push Pull framework, and then passed down
into the SFTP protocol; or more generally just change it to a protocol only
property and set there).


> 
> Let me know how to add a new property for the port number.

Let me know what you think? We can file a JIRA issue and
when we have decided on an approach, create a patch and go from there.

Thanks!

Cheers,
Chris

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov
WWW: http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message